0

Cacao

Create a class called Car that includes three instance variables—a model (type String), a year (type String), and a price (double). Provide a constructor that initializes the three instance variables. Provide a set and a get method for each instance variable. If the price is not positive, do not set its value. Write a test application named CarApplication that demonstrates class Car’s capabilities. Create two Car objects and display each object’s price.

3rd Jan 2023, 3:00 AM
Sarah
Sarah - avatar
1 Answer
+ 4
What is YOUR question? What have you tried so far?
3rd Jan 2023, 3:50 AM
Tibor Santa
Tibor Santa - avatar