Starting from:

$20

CSI2372- Lab 5 Solved

Exercise 1 of 6) Define a class named Money that stores a monetary amount.  The class should have two private integer variables, one to store the number of dollars and another to store the number of cents.   Add accessor and mutator functions to read and set both member variables.   Add another function that returns the monetary amount as a double.  Write a program that tests all of your functions with at least two different Money objects.
 

Exercise 2 of 6) Do the Exercise 1, the definition of a Money class, except create a default constructor that sets the monetary amount to 0 dollars and 0 cents, and create a second constructor with input parameters for the amount of the dollars and cents variables.  Modify your test code to invoke the constructors.

 
 Exercise 3 of 6) Define a class called StartTime with the following attributes and methods  

 


 

More products