WAP to calculate and display the volume of sphere and cylinder
demonstrating the concept of function overloading
WAP to calculate and display the perimeter of triangle, rectangle and square
demonstrating the concept of function overloading
WAP to calculate and display the surface area of sphere and cylinder demonstrating the concept of function overloading
WAP to calculate and display the area of triangle, rectangle, square and
circle demonstrating the concept of function overloading.
WAP to calculate simple interest using class (Display principal, rate and time along with simple interest)
WAP to find Largest among 3 numbers using class (Display all the three numbers along with largest value)
You are requested to write a program which will be used to take the entry test for university
students. The program must have following features.
• For correct answer, students get 4 marks.
• For wrong answer, student lose 1 mark.
• If the student answers first four questions wrong exit the program with a message “Sorry,
you did not qualify for the admission.”
• If students score 20 marks, program should display “Congratulations, you have qualified for
the admission “and exit.
• There will be only 4 options for each question
Write a C++ program to create a base class called STUDENT (Name, Roll Number, Age) and using inheritance create classes UG student and PG student having fields as semester, fees and stipend. Enter the data of 5 students. Store each set of data to file. Find the average age, semester wise for all UG and PG students separately from file. (Assume at least two different values for the semester field for each of UG and PG classes).
What is operator overloading? Explain this concept and provide a suitable example.
You are working as a computer engineer in a firm where your task for this week is to
model a Counter class in C++. You are asked to:
• Have a default constructor
• Have a constructor which should take an initial value of count
• Have a copy contractor
• Have a print function to print the count value
• Have a ++ increment operator overladed as prefix and postfix operator
• Have a -- increment operator overladed as prefix and postfix operator
• Have a destructor
Your task is to:
1. Draw the class diagram
2. Implement the class
3. Write the test code to test all the features of your class in the main program.