Java Student in trouble!
Well, I am in the middle of doing a programming question for an assignment. Think I have gotten most of it right but its just killing me that I don't have enough time to finish everything... (Due in later tonight). I still have to start the 2nd question myself, but this is what I got for the first one!
This is the question:
Part 1 (50 marks)
a) Write the Java code for a class called Patient.
• The Patient class should have the following four private instance variables:
Choose the correct type for each of the instance variables.
• Include a default constructor.
• Include a constructor that accepts four parameter values: name, iDNumber, age, and gender.
• Include get and set methods for each of the instance variables.
• Include a method called print() that prints the value of all the instance variables to the screen, e.g.
Patient name: Joe Bloggs
b) Write the Java code for a class called PatientTestApplication (containing a public static void main(String  args) method) which tests the two constructors, the get and set methods, and the print() method of the Patient class.
• This class should create two objects of the class Patient, using each constructor in the Patient class definition.
• It should then test all the get and set methods on each object.
• It then uses the print() method on both objects to print the object’s details to screen.
This is what i have got so far...
Re: Java Student in trouble!
Well... no one decided to even bother helping me :( Its ok I still managed to actually get it done and get pretty good marks for most of it!
No thanks to anyone here...
Happy but dissapointed :mean:
|All times are GMT +5.5. The time now is 16:03.|