Write a class and member functions for a class complex as follows
Class complex
{
Int re, img;
public:
complex (int =0,int=0);
complex(complex &);
void accept();
void display();
complex add(const complex &);
Write necessary class and member function definitions for a cricket player object. (Use array of objects).
The program should accept details from user (max 10) : player code, name, runs, Innings, played, number of times not out.
The program should contain following menu:-
Enter details of players.
Display average runs of a single player.
Average runs of all players
Husna Dental is a personal dental clinic that recently operated on 1st January 2015. The payment for
dentistry services at Husna Dental is different based on the type of treatment and patient status.
Types of Treatment and Price
Patient Status Restoration(1) Extraction(2) Scaling(3)
Children(C) RM6.00 RM15.50 RM4.00
Adult(A) RM7.50 RM18.00 RM5.00
Due to the opening ceremony, the discount of 20% will be given for children’s treatment and 15%
discount for adult’s treatment.
Write a C++ program that performs the following.
· Reads the patient's name, patient status, and type of treatment.
· Displays the appropriate message when the user enters an invalid status.
· Calculates the payment before and after discount.
· At the end of the program, displays receipt that contain patient’s name and her/his total
payment after discount.
Develop a code for the hierarchical inheritance for banking account,
· The Bank_ACC base class consisting of data members such as accno and name, and member functions get() and display().
· The SB_ACC derived class inherited from Bank_ACC class, consisting of data members such as roi, and member functions get() and display().
· The CUR_ACC derived class inherited from Bank_ACC class, consisting of data members such as odlimit, and member functions get() and display()
Runtime input
1356
Nitin
6
Declare the class Time consisting of data members hours, minutes and seconds. Invoke a null constructor Time() when an object is created, the parameterized constructor Time(hrs, min, sec) to assign values for the data members and show() member function is used to display the time information in format. Finally free the resources of data objects using destructor member function
Run time input
12
20
65
Create a class Armstrong and include startnumber and endnumber as data member and aslo include member function findArmstrongNumbers() to find all the Armstrong numbers between startnumber and endnumber. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number
Run time input 1and 500
Monica needs to represent the month of July, with dates and days, on one of the slides in her school presentation. Which element can she use to get this effect?