AP/ITEC 1620 O&P: Information and Organizations
In this assignment you will create two Java programs:
1. The first program will be a class that holds information (instance variables) about an object of your choice and provides the relevant behavior (methods).
2. The second program will be the main program which will instantiate several objects using the class above and will test all the functions (methods) of the class above.
You cannot use any of the home assignments as your submitted assignment.
Your programs must meet the following qualitative and quantitative criteria:
1. Contain at least 5 instance variables of at least three distinct data types (0.5 marks)
2. Provide a constructor (0.5 marks)
3. Provide a toString() method to print the data of an object in an appropriately formatted string (including text to help the reader understand the data content). (0.5 marks)
4. Provide two other methods that implement some behaviour of your object; getters and setters do dot qualify, and each method must contain at least 5 Java statements; what the method does must make logical sense and be consistent with the object (1.5 marks)
1. Instantiate an ArrayList of objects of your class above in part A; Read all the data required by an object in part A from System.In, instantiate the object and store it in the ArrayList; continue retrieving input, creating and storing objects until a sentinel value marks the end of the input. (1.5 marks)
2. Ensure that ALL input errors will be handled correctly (0.5 marks)
3. Test both methods of the class above; this will typically involve printing the object before the method is called and after; (1 mark)
4. Print the content of the object array using the formatted printing method provided by the class (1 mark)
5. Have correct style (use of the standard template, use of comments, correct alignment and indentation of statements, good choice of names, appropriate use of case) (1 mark)
All assignments must compile under the basic Java Development Toolkit (JDK 10 or JDK9). If the assignment does not compile a penalty of 3 marks will be applied. It is strongly recommended that you use only the JDK and NotePad++ for creating the assignment. Instructions for setting up your technical environment are on the Moodle course site.
Remember: When in doubt, ASK!