Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Create a class called Vehicle that keeps track of a vehicle. It should have: a constructor that sets the type (string) and the (int)

c++ image text in transcribed
Create a class called Vehicle that keeps track of a vehicle. It should have: a constructor that sets the type (string) and the (int) top speed. a default constructor that sets the top speed to 1 and the name to "unknown" a getter for type and the top speed . a setter for the top speed The setter should validate that the top speed is between 0 and 1000. a getSpeed Category() method that returns the classification for the top speed. Between 0-20 "Category 1: Slow" o Between 21-50 - "Category 2: Average" o Between 50 - 100 - "Category 3: Fast" - Between 100 - 200 - "Category 4: Accelerated" 200+ "Category 5 - Unsafe" Make sure to comment the include guard so that I know you know where it is

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

=+What is your birthday? (often on application forms) Disability

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago