Home >
Back-end > Class design and calling someone can explain ha
Class design and calling someone can explain ha
Design a supermarket membership class Member. This class contains data members and Member functions are as follows: data members are: Member id number, name, Member name sex of gender and grade membership grade, Member, discount discount. Design a constructor with parameters, the definition of the object to initialize all the data members (except the Member discount discount), define a used to increase membership grade in the add Member function, define a Member for o CalDiscount discount discount Member functions, and the calculated results with the return value of the returns, the Member discount discount, the calculation formula is: discount=showMember a Member functions are defined, for all the information displayed on the screen members, defined in the main function of three members, call the corresponding function members to test the functionality of the design,