Saved Bookmarks
| 1. |
13. Define a class called parking lot with the following specifications. Instance variables / data membersint vno - to store the vehicle number.int hours - to store the number of hours the vehicle is parked in the parking lot.double bill - to store the bill amount.Member methods:void input(): to input and store the vno and hours.V Edit with WPS Officevoid calculate(): to compute the parking charges at the rate of 3 rs for the first hour and1.50 rs for each additional hour.write a main method to create an object of the class and call the above methods. |
|
Answer» ong>Answer :Member methods: ShowRoom(): default constructor to INITIALIZE data ... DEFINE a class Electric Bill with the following specifications: Instance Variable/ data ... store the number of hours the vehicle is PARKED in the parking lot double bill – To store the ... Scanner; class ParkingLot { int vno; int hours; double bill; public void input() ... Please marked me as Brainlyst answer and GIVE me points and thanks for my all ANSWERS please please......... |
|