Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

C++ Programming Part 1 Select 1 class from the following options. Answer the following questions: What data could each object of this class type need...

C++ Programming

Part 1

Select 1 class from the following options. Answer the following questions:

  1. What data could each object of this class type need to store?
  2. What behavior or functionality could each object of this class perform?
  3. Provide the class definition of your class using C++ syntax. (Refer to the CashRegister class definition at the bottom of page 393).

Select one of the following classes that might be used within a C++ program for a kiosk that provides self-service bicycle and scooter rentals:

Option 1: Bike class

Option 2: Scooter class

Option 3: Renter class

Part 2

Your town has become concerned with the increase in automobile traffic and has invested in purchasing bicycles to rent. Kiosks have been built throughout the town and an inventory of bicycles to rent is available at each kiosk. You have been asked to write a C++ program for your town’s kiosk that provides self-service bicycle and scooter rentals:

Your assignment is to develop a Bicycle class with private data members brand, hourlyRentalRate, and rentedBy. Your Bicycle class should implement at least one constructor that sets an initial value for at least one of the data members. Implement accessor member functions for all private data members. Implement a mutator member function that sets the rentedBy data member to a renter when a bicycle is rented.

To test a class you would write a program that uses the constructor to construct an object of the class type and then calls all mutator member functions. Write a program that tests your Bicycle class. You must thoroughly comment your code by providing a comment for each line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Part 3

Write a program that reads each line in a file, reverses its characters, and writes the resulting line to the same file. Use the following pseudocode:

While the end of the file has not been reached

pos1 = current get position

Read a line

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question