Thursday, 28 June 2018
Comment for solutiion java
In this assignment you will create two Java programs: 1. The
first program will be a class that holds information (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: A.
Your class must: 1. Contain at least 5 instance variables (0.5
marks) 2. Contain at least 2 methods other than the constructor (2
marks) 3. Provide a toString() method to print the data of an
object in an appropriately formatted string (this does not count as
one of the two methods above). (0.5 marks) B. The main program
must: 1. Read its data from System.In using a sentinel value to
detect the end of the input. (1 mark) 2. Ensure that input errors
will be handled correctly (0.5 marks) 3. Instantiate an array of
objects of your class above, using the data input by the user to
construct the objects (0.5 marks) 4. Test both methods of the class
above (1 mark) 5. Print the content of the object array using the
formatted printing method provided by the class (1 mark) 6. Have
correct style (use of the standard template, use of comments,
correct alignment of statements, good choice of names, appropriate
use of case) (1 mark) Can someone please help me by giving an
example? Or even an example of each requirement with an
explanation. Thanks!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment