Students, please be sure to log in. This site does not use cookies and cannot store work submitted when not signed in.

Unit 5 Problems

Vehicle

In this problem, you're practicing writing a complete class that includes the header, instance variables, and constructor(s). This problem does not test your getter/setter fully, but they must exist.

Write a class called Vehicle with instance variables doors, speed, and color. Use only int, double, and String for data types.

Writer a getter and setting for speed.

Include a constructor that will allow the creation/instantiation of a Vehicle object with a specific color. No other constructors are required.

Type your solution        
Skills Practiced:
3.B
4.A
4.B
Copyright © StudyCS 2024 All rights reserved.