Question: i want UML DIAGRAM for this program: #include using namespace std; class parkingnCharges{ private: double hours, tHours; //copy of hours to used for calculation double

i want UML DIAGRAM for this program:

#include using namespace std;

class parkingnCharges{

private: double hours, tHours; //copy of "hours" to used for calculation double addition_per_hr = 0.50; //if hours is more than 3 hours,then add .50$ per hour. double charge;

double minimum_charge = 2.00 //minimum charge for up to 3 hrs , maximum_charge = 10.00; //maximum charge for 24 hrs

public:

void getHours(){ unsigned long int hrs, min; //to get and cnvert the hours cout << "please enter the hours you want to park: hour then minute "; cin >> hrs;

cout << "\b\b:"; cin >> min; cout << endl; // hours = hrs + (min > 0 ? min = 1 : min = 0); tHours = hours; }

void calculateCharges(){

if (tHours <= 3){ charge = minimum_charge; }

else if (tHours > 3 && hours < 24){ tHours -= 3; charge = minimum_charge + (tHours * addition_per_hr); }

else if (hours = 24){ charge = maximum_charge; } }

void printing(){ cout << "The fee charged for " << hours << " is " << charge << endl << endl;

} };

int main(){

//making an object parkingnCharges ob; parkingnCharges ob1, ob2, ob3; //first and secound and third person

//calculating ob1.getHours(); ob1.calculateCharges();

ob2.getHours(); ob2.calculateCharges();

ob3.getHours(); ob3.calculateCharges();

//printing ob1.printing(); ob2.printing(); ob3.printing(); {int t; cin >> t; } //for the use of Microsoft Viual studio

return 0;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!