subject

Design a base class, Road, with the following members: .
Attributes for storing the road's name, number of lanes, and maximum speed limit.
A three-parameter constructor to initialize the three attributes
Accessors and Mutators (Gets and Sets) for each attribute.
Input Validation: You should ensure that the number of lanes is always a value greater
than 0, and that the maximum speed limit is a value between 0 and 100 MPH. This input
validation should apply to both the 3-parameter constructor and the individual accessor
functions
A display function that prints the road's information in a single line format

Design a derived class, TollRoad, which inherits from Road. It should have the following members:
.
An attribute for storing the toll for using the road.
A 4-parameter constructor to initialize the three attributes of the base class, as well as
the toll
Accessor and Mutator methods for the toll.
Input Validation: You should ensure that the toll is a value greater than 0.0. This validation
should apply to both the 4-parameter constructor as well as the individual accessor
An overridden display function that displays the information of the TollRoad in a two-line
format, where the first line displays basic Road information, and a second line specifies
the current toll

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Selling a product through an electronic medium is
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
You know the right answer?
Design a base class, Road, with the following members: .
Attributes for storing the road's na...
Questions
question
Mathematics, 04.07.2019 09:00
question
Social Studies, 04.07.2019 09:00
Questions on the website: 13722363