Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2018 Fall CIS 200 Lab 5 Class, Inheritance and UML Assignment date: October 10, 2018 Due: October 17, 2018 Program 1 The following is a

image text in transcribed

image text in transcribed

2018 Fall CIS 200 Lab 5 Class, Inheritance and UML Assignment date: October 10, 2018 Due: October 17, 2018 Program 1 The following is a specification of three classes: Class Vehicle: Attributes: Age, an integer The age of the vehicle Price, a float The price of the vehicle Behaviors: setAge () Vehicle) default constructor sets age-o, and price-o.o Takes an integer parameter, returns nothing setPrice() Takes a float parameter, returns nothing getAge ) Takes no parameters, returns the vehicle's age getPrice ()Takes no parameters, returns the vehicle's price End class Vehicle Class Car: Attributes An object of type Car has all the attributes of an object of type Vehicle Additionally, Cars have attributes that Vehicles do not: RaceCarStatus , a boolean-> true or false Behaviors An object of type Car has all the behaviors of an object of type Vehicle Additionally, Cars have behaviors that Vehicles do not: Car() default constructor sets RaceCarstatus-false setRaceCarStatus() Takes an boolean parameter, returns nothing getRaceCarStatus() Takes no parameters, returns the car's race car status End Class Car 2018 Fall CIS 200 Lab 5 Class, Inheritance and UML Assignment date: October 10, 2018 Due: October 17, 2018 Program 1 The following is a specification of three classes: Class Vehicle: Attributes: Age, an integer The age of the vehicle Price, a float The price of the vehicle Behaviors: setAge () Vehicle) default constructor sets age-o, and price-o.o Takes an integer parameter, returns nothing setPrice() Takes a float parameter, returns nothing getAge ) Takes no parameters, returns the vehicle's age getPrice ()Takes no parameters, returns the vehicle's price End class Vehicle Class Car: Attributes An object of type Car has all the attributes of an object of type Vehicle Additionally, Cars have attributes that Vehicles do not: RaceCarStatus , a boolean-> true or false Behaviors An object of type Car has all the behaviors of an object of type Vehicle Additionally, Cars have behaviors that Vehicles do not: Car() default constructor sets RaceCarstatus-false setRaceCarStatus() Takes an boolean parameter, returns nothing getRaceCarStatus() Takes no parameters, returns the car's race car status End Class Car

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago