For this task you will create a Subject class, whose instances will represent the subjects for study at a university. A subject will have a name, just a String, and a subject code, which is a six-character String. The first three characters of a subject code are alphabetic and the last three are numeric. The first three characters define the subject’s discipline area. A subject code must be unique.
You will also write a TestSubject class to test the use of your Subject class. In particular this will maintain an array of subjects. In order to manage the uniqueness of the subject codes, your program will need to display information about existing subject codes as well as checking that any new subject code supplied by the user is not the same as any existing subject code.
The following state and functionality should be provided for the Subject class:
To assist with managing subject codes and their uniqueness you will provide the Subject class with some class methods as follows:
Your TestSubject program will perform the following sequence of actions, using good design techniques such as in the appropriate use of methods:
• An initial array of Subject objects will be created from any data in a file that was previously saved by the program.
Note: You may use an ArrayList to implement an array if you prefer and it is appropriate.
In this task, you are required to provide complete class definitions and then create instances of various classes and use methods to perform various tests.
(a) Define an abstract class called Textbook with the following fields and methods:
(b) Define a subclass of the Textbook class called ProgrammingTextbook with the following additional field and methods:
(c) Define another subclass of the Textbook class called EngineeringTextbook with the following additional field and methods:
(d) Finally, define another class called TestTextbooks with a main() method to perform necessary testing for the classes defined in the previous sections. In the main method, write the code to create at least two objects of the ProgrammingTextbook class and at least two other objects of the EngineeringTextbook class. Create an ArrayList object to store references to these objects and then test various methods of the objects using loop(s) and methods as necessary.
Ensure that the program is appropriately documented throughout and thoroughly tested to demonstrate its correct operation.
Material to submit for Assignment 3:
You need to submit a single zip file containing ALL of the required assignment documents including the java and class files as well as the test documents.
We value our customers and so we ensure that what we do is 100% original..
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
The Product ordered is guaranteed to be original. Orders are checked by the most advanced anti-plagiarism software in the market to assure that the Product is 100% original. The Company has a zero tolerance policy for plagiarism.Read more
The Free Revision policy is a courtesy service that the Company provides to help ensure Customer’s total satisfaction with the completed Order. To receive free revision the Company requires that the Customer provide the request within fourteen (14) days from the first completion date and within a period of thirty (30) days for dissertations.Read more
The Company is committed to protect the privacy of the Customer and it will never resell or share any of Customer’s personal information, including credit card data, with any third party. All the online transactions are processed through the secure and reliable online payment systems.Read more
By placing an order with us, you agree to the service we provide. We will endear to do all that it takes to deliver a comprehensive paper as per your requirements. We also count on your cooperation to ensure that we deliver on this mandate.Read more