subject

Create a business class to model a bike. Then create a tester class to test the bike class and create list of bikes. Details are as follows: Bike Class
1. Create a business class called Bike
2. Bikes should at least have number of wheels, manufacturer and year data. Additional data can be created at the programmer’s discretion.
3. A no-arg constructor with values of 2 for number of wheels to 2, "Schwinn" for manufacturer, and 2014 for year should eb created.
4. Other constructors, getters, setters and toString() method should be created.
BikeTester Class
1. Use the BikeTester class to create object bike1 using no-arg constructor. Print its details after creation.
2. Create object bike2 in the same manner, and use the setter methods to change the instance variable values to those below:
1) number of wheels: 3
2) year: 2012
3) Manufacturer: Hyffy
3. Print details of bike2.
4. Create an arraylist of bikes called bikeList.
5. Add bike1 and bike2 to this list
6. SOP bikeList
7. Count the total number of wheels on all bikes in the bikeList and print them
8. Find the year of the oldest bike in the list and print that year.
9. Ensure that all of your code is thoroughly commented.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Designing a mobile web page is a little different from designing a regular web page. name at least three features that should be considered when designing a website that is mobile phone-friendly, and briefly explain why they are important.
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
You know the right answer?
Create a business class to model a bike. Then create a tester class to test the bike class and creat...
Questions
Questions on the website: 13722359