Question: I'm lost on this one. Help is much appreciated. I've went over the book many times. It just doesn't explain this. Code the following ADTs
I'm lost on this one. Help is much appreciated. I've went over the book many times. It just doesn't explain this.
Code the following ADTs (classes), making sure to follow the instructions in the bulleted lists:
- class namedEmployee
- that has the following fields:
- name
- idNumber
- department
- position (job title)
- and the following methods:
- A no-argument constructor
- A constructor that sets the data to passed values
- Getters and setters for each piece of data
- A toString( ) method to display the object data
- Include Javadoc comments for the class and every method
- Use a separate Java application to "unit test" this class by creating 3 objects.
- Generate the Javadoc/API document for this ADT
- class nameCar
- that has the following fields:
- yearModel (integer holding the car's year model)
- make (String holding the make of the car)
- speed (integer holding the car's current speed)
- and the following methods:
- A no-argument constructor
- A constructor that sets the data to passed values
- Getters and setters for each piece of data
- accelerate: adds 5 to the speed field each time it is called
- brake: subtracts 5 from the speed field each time it is called
- A toString( ) method to display the object data
- Include Javadoc comments for the class and every method
- Use a separate Java application to "unit test" this class by creating 2 objects.
- Generate the Javadoc/API document for this ADT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
