1. Complete the partial declaration of Class Car public class Car { declare three private instamce variables: color, speed, model / define a constructor with two parameters. C, m which will assign...


1. Complete the partial declaration of Class Car<br>public class Car {<br>declare three private instamce variables: color, speed, model<br>/ define a constructor with two parameters. C, m which will assign values to color<br>and model.<br>/define set and get method for all instance variables<br>/define a method named calspeed() with int return type, the method will increase<br>the speed by 50 mile per hour.<br>2. Complete the application below.<br>public class CarApp {<br>public static void main() {<br>string color<br>string model<br>int speed<br>%3D<br>C2021;i<br>%3D<br>T08<br>//declare necessary object matching to the constructor definition<br>1/ display the color and model on the screen<br>W call the calsneed) method and display the new speed after calculation.<br>Page 2 of 2<br>可 圓 刨<br>24°C uaio<br>

Extracted text: 1. Complete the partial declaration of Class Car public class Car { declare three private instamce variables: color, speed, model / define a constructor with two parameters. C, m which will assign values to color and model. /define set and get method for all instance variables /define a method named calspeed() with int return type, the method will increase the speed by 50 mile per hour. 2. Complete the application below. public class CarApp { public static void main() { string color string model int speed %3D C2021;i %3D T08 //declare necessary object matching to the constructor definition 1/ display the color and model on the screen W call the calsneed) method and display the new speed after calculation. Page 2 of 2 可 圓 刨 24°C uaio

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here