In Java program, please show the output of the program. Thank youuuuuuuuuuuuuu!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

In Java program, please show the output of the program. Thank youuuuuuuuuuuuuu!

Perform the steps below using any Java IDE
or https://www.idoodie.com/online-lava-compler/
This activity is good for two (2) weeks.
1. Create one (1) class named Car
2. In the Car class, initialize two (2) public static
variables: MAKE (String, final) and
numCars (int). Set their values to Toyota' and
0, respectively
3. Declare two (2) empty String instance variables
named chassisNo and model
4. Create a public constructor with a single
parameter named model (String). This
constructor should
• Increment the value of numCars by one
• Set the value of chassisNo based on the
result of concatenating the String 'ch
and the value of numCars Syntax
chassisNo= "ch" + numCars
• Use the this keyword to set the instance
variable model equal to the value of the
parameter model
Display a message saying "Car
manufactured
5. Create two (2) pairs of getter and setter
methods that will allow you to get and set the
values of the two (2) instance variables:
getModel() and setModel().getChassis No()
and setChassisNo
Doplay a message saying Car
manufactured
5. Create two (2) pairs of getter and setter
methods that will allow you to get and set the
values of the two (2) instance variables
geMode and setModel) getChassisNo
and setChassis No
6 Add a public toString() method that will return
and display the car's make model, and chassis
number in separate lines
7. in the main method, display the car's make and
the initial number of manufactured cars by
accessing them from the Cars class Example
System.out.println(Manufacturer: MAKE
8 instantiate two (2) Car objects assigning the
values "Camry and Velo", respectively
Example Car cart new Car(Camry
9. Add two (2) statements to display the data of
the two (2) Car objects. Example
System.out.print(car1)
10 Display the total number of cars manufactured
by accessing the numCars method.
Sample Output
Manufacturer Toyota
Number of cars manufactured
Transcribed Image Text:Perform the steps below using any Java IDE or https://www.idoodie.com/online-lava-compler/ This activity is good for two (2) weeks. 1. Create one (1) class named Car 2. In the Car class, initialize two (2) public static variables: MAKE (String, final) and numCars (int). Set their values to Toyota' and 0, respectively 3. Declare two (2) empty String instance variables named chassisNo and model 4. Create a public constructor with a single parameter named model (String). This constructor should • Increment the value of numCars by one • Set the value of chassisNo based on the result of concatenating the String 'ch and the value of numCars Syntax chassisNo= "ch" + numCars • Use the this keyword to set the instance variable model equal to the value of the parameter model Display a message saying "Car manufactured 5. Create two (2) pairs of getter and setter methods that will allow you to get and set the values of the two (2) instance variables: getModel() and setModel().getChassis No() and setChassisNo Doplay a message saying Car manufactured 5. Create two (2) pairs of getter and setter methods that will allow you to get and set the values of the two (2) instance variables geMode and setModel) getChassisNo and setChassis No 6 Add a public toString() method that will return and display the car's make model, and chassis number in separate lines 7. in the main method, display the car's make and the initial number of manufactured cars by accessing them from the Cars class Example System.out.println(Manufacturer: MAKE 8 instantiate two (2) Car objects assigning the values "Camry and Velo", respectively Example Car cart new Car(Camry 9. Add two (2) statements to display the data of the two (2) Car objects. Example System.out.print(car1) 10 Display the total number of cars manufactured by accessing the numCars method. Sample Output Manufacturer Toyota Number of cars manufactured
the two (2) Car objects. Example:
System.out.println(car1);
10. Display the total number of cars manufactured
by accessing the numCars method.
Sample Output:
//Initial values
Manufacturer: Toyota
Number of cars manufactured: 0
Car manufactured
//After instantiating first Car object
The car is manufactured by: Toyota
The model type is Camry
The chassis number is ch1
Car manufactured
//After instantiating second Car object
The car is manufactured by: Toyota
The model type is Veloz
The chassis number is ch2
//Total number of cars manufactured
Number of cars manufactured: 2
Transcribed Image Text:the two (2) Car objects. Example: System.out.println(car1); 10. Display the total number of cars manufactured by accessing the numCars method. Sample Output: //Initial values Manufacturer: Toyota Number of cars manufactured: 0 Car manufactured //After instantiating first Car object The car is manufactured by: Toyota The model type is Camry The chassis number is ch1 Car manufactured //After instantiating second Car object The car is manufactured by: Toyota The model type is Veloz The chassis number is ch2 //Total number of cars manufactured Number of cars manufactured: 2
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY