1). Design an abstract class called Customer and an abstract method CalculateDiscount(). Design a calculator program that determines the amount of discount a customer can claim on the system. Regular Customer gets 2% off their total purchase and Member Customer gets 8% off their total purchase. The system should allow the customer to select either they are; a Regular Customer or Member Customer.
2) Design an Activity Diagram for the following business process.
When the passenger decides to board the train, they will have to produce their ticket at the check in counter. The Passenger Ticket Service System will then verify the passenger's ticket. Should there be problem/s with the passenger's luggage, the system will then flash a message instructing the passenger to visit the closest station's customer service counter and the system ends.
If there is no complication with the ticket, the passenger will then be able to check in their luggage (one piece only with max weight of 30lbs). Once the The Passenger Ticket Service System weights the customer luggage, and assuming it is under 30 Lbs, then the system will accepts the luggage and a boarding pass will be printed out by the system. Should the passenger's luggage weights more than the maximum allowable weight (30 lbs) the passenger will then have to pay the overweight charges before a boarding pass will be issued by the system. The system ends after a boarding pass has been issued.
#include<iostream>
using namespace std;
class Customer{
public:
virtual double calculateDiscount(double purchese) =
0;
};
class RegularCustomer: public Customer{
public:
double calculateDiscount(double purchase){
return 0.02 * purchase;
}
};
class MemberCustomer: public Customer{
public:
double calculateDiscount(double purchase){
return 0.08 * purchase;
}
};
int main(){
RegularCustomer r;
MemberCustomer m;
int n;
double amt;
cout <<"Please choose 1-Regular Customer,
2-MemberCustomer :";
cin >> n;
if (n == 1){
cout << "Enter total
purchase amount: $";
cin >> amt;
cout << "The discount is
$" << r.calculateDiscount(amt) << endl;
}
if (n == 2){
cout << "Enter total
purchase amount: $";
cin >> amt;
cout << "The discount is
$" << m.calculateDiscount(amt) << endl;
}
return 0;
}
1). Design an abstract class called Customer and an abstract method CalculateDiscount(). Design a calculator program...
What happened on United flight 3411?What service expectations
do customers have of airlines such as United and How did these
expectations develop over time?
Thank You!
In early April 2017, United Airlines (United), one of the largest airlines in the world, found itself yet again in the middle of a service disaster this time for forcibly dragging a passenger off an overbooked flight. The incident was to become a wake-up call for United, forcing it to ask itself what to...