Create a class named Points with the following data members: custId, name, phonePoints and internetPoints.
Implement the following member functions in class Points:
I. Input() to input customer’s data (custId and name).
II. getPoints() to input the phone points and internet points.
III. calcPoints() to calculate the total points based on phone points and internet points using value-return method.
IV. calcBonus() to calculate the bonus points using value-return method. If total points is greater than 35, then bonus will be 10%, else if total point is greater than 20, then bonus will be 5%, otherwise 0%.
V. display() to display customer’s custId, name , total Points and bonus.Create class that hosts the main method and create one object. The created object should be used to call the respective functions to test their functionalities and display appropriate messages.
Create a class named Points with the following data members: custId, name, phonePoints and internetPoints. Implement the
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am