Create a 'STRING' class which overloads ‘= = ' operator to compare two STRING objects.
Create a class movie for ticket booking with data members theatrename, date, moviename, screenno, amount, no_of_tickets and total_amount and include functions reservation() , bookiing_details().
Create dynamic object and display ticket booking details.
Suppose there are some employees working in a firm. The firm hires only two types of employees- either driver or developer. Now, you have to develop a C++ program to store information about them. Employee class has name and getEmployee(), declare showEmployee() as pure virtual function. There is no need to make objects of employee class. Make objects to only driver or developer. Also, both must have experience and salary. Set default salary 15000 for developer and 6000 for driver. Provide salary according to their experience. Give 500 rupees extra for each 1 one year of experience. Make Employee as an abstract class and Developer and Driver its subclasses. Use abstract class and Pure virtual functions concept.
Develop a C++ for the Student Examination Details having student class with data members like roll no, name, marks and grade. Member functions in this class are used for accept / display details of students. Create derived classes such as Engineering, Medical, Sciences etc.. calculate grade based on marks obtained by student. [Note: Use virtual function]
Create a class Index which keeps track of the Index value. Write an overloaded function to display the index value after increment and decrements the Index value.
This chapter defines the class clockType to implement time in a program. Add functions to this class so that a program that uses this class can set only the hours, minutes, or seconds and retrieve only the hours, minutes, or seconds. Make the functions that retrieve hours, minutes, and seconds as inline. Also, write a program to test your class.
The header file for the class clockType, as it is defined in this chapter, has been provided for you.
Define a class counterType to implement a counter. Your class must have a private data member counter of type int. Define a constructor that accepts a parameter of type int and initializes the counter data member. Add functions to:
The value of counter must be nonnegative.
Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class studentType with the same components as the struct studentType, and add member functions to manipulate the data members. (Note that the data members of the class studentType must be private.)
Write a program to illustrate how to use the class studentType.
struct studentType
{
string firstName;
string lastName;
char courseGrade;
int testScore;
int programmingScore;
double GPA;
};An example of the program is shown below:
Name: Sara Spilner
Grade: A
Test score: 89
Programming score: 92
GPA: 3.57
***************Define a struct menuItemType with two components: menuItem of type string and menuPrice of type double.
Assume the definition of Exercise 2, which defines the struct computerType. Write a program that declares a variable of type computerType, prompts the user to input data about a computer, and outputs the computer’s data.
Example input and output is shown below:
Enter the name of the manufacturer: McPC
Enter the model of the computer: 1000
Enter processor type: Intel GFX
Enter the size of RAM (in GB): 8
Enter the size of hard drive (in GB): 1000
Enter the year the computer was built: 2016
Enter the price: 1200
Manufacturer: McPC
Model: 1000
Processor: Intel GFX
Ram: 8
Hard Drive Size: 1000
Year Built: 2016
Price: $1200.00 Instructions from Exercise 2 have been posted below for your convenience.
Define a struct computerType to store the following data about a computer: Manufacturer (string), model type (string), processor type (string), ram (int) in GB, hard drive size (int) in GB, year when the computer was built (int), and the price (double).