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 00:50
Is one of the most injurious events that can happen to a person in a crash.
Answers: 1
question
Computers and Technology, 22.06.2019 13:50
The instruction ishl (shift left integer) exists in jvm but not in ijvm. it uses the top two values on the stack, replacing the two with a single value, the result. the sec- ond-from-top word of the stack is the operand to be shifted. its content is shifted left by a value between 0 and 31, inclusive, depending on the value of the 5 least signifi- cant bits of the top word on the stack (the other 27 bits of the top word are ignored). zeros are shifted in from the right for as many bits as the shift count. the opcode for ishl is 120 (0x78).a. what is the arithmetic operation equivalent to shifting left with a count of 2? b. extend the microcode to include this instruction as a part of ijv.
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
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
question
Mathematics, 21.09.2021 14:00
question
Physics, 21.09.2021 14:00
Questions on the website: 13722360