Posted on January 15, 2024January 15, 2024Write a program for overloading of Unary ++ operator. Continue reading “Write a program for overloading of Unary ++ operator.”
Posted on January 15, 2024January 15, 2024Consider an example of declaring the examination result. Design three classes student, exam, and result. The student has data members such as roll no, and name. Create the lass exam by inheriting the student class. The exam class adds data members representing the marks scored in 5 subjects. Derive the result from exam-class and it has own data members like total, avg. Continue reading “Consider an example of declaring the examination result. Design three classes student, exam, and result. The student has data members such as roll no, and name. Create the lass exam by inheriting the student class. The exam class adds data members representing the marks scored in 5 subjects. Derive the result from exam-class and it has own data members like total, avg.”
Posted on January 15, 2024January 15, 2024Consider a publishing company that markets both book and audio cassette version to its works. Create a class Publication that stores the title (a string) and price (type float) of a publication. Derive the following two classes from the above Publication class: Book which adds a page count (int) and Tape which adds a playing time in minutes(float). Each class should have get_data() function to get its data from the user at the keyboard. Write the main() function to test the Book and Tape classes by creating instances of them asking the user to fill in data with get_data() and then displaying it using put_data() Continue reading “Consider a publishing company that markets both book and audio cassette version to its works. Create a class Publication that stores the title (a string) and price (type float) of a publication. Derive the following two classes from the above Publication class: Book which adds a page count (int) and Tape which adds a playing time in minutes(float). Each class should have get_data() function to get its data from the user at the keyboard. Write the main() function to test the Book and Tape classes by creating instances of them asking the user to fill in data with get_data() and then displaying it using put_data()”
Posted on January 15, 2024January 15, 2024Write a C++ program to compute area of right angle triangle, equilateral triangle, isosceles triangle using function overloading concept. Continue reading “Write a C++ program to compute area of right angle triangle, equilateral triangle, isosceles triangle using function overloading concept.”
Posted on January 15, 2024January 15, 2024Write the above program for handling n number of account holders using array of objects. Continue reading “Write the above program for handling n number of account holders using array of objects.”
Posted on January 15, 2024Define a class to represent a bank account which includes the following members as Data members: a) Name of the depositor b) Account Number c) Withdrawal amount d) Balance amount in the accountMember Functions: a) To assign initial values b)To deposit an amount c) To withdraw an amount after checking the balance d) To display name and balance. Continue reading “Define a class to represent a bank account which includes the following members as Data members: a) Name of the depositor b) Account Number c) Withdrawal amount d) Balance amount in the accountMember Functions: a) To assign initial values b)To deposit an amount c) To withdraw an amount after checking the balance d) To display name and balance.”
Posted on January 15, 2024January 15, 2024Write a program to find the factorial of a number. Continue reading “Write a program to find the factorial of a number.”
Posted on January 15, 2024Write a function to find the largest of three numbers. Continue reading “Write a function to find the largest of three numbers.”
Posted on January 15, 2024January 15, 2024Write a function using reference variables as arguments to swap the values of a pair of integers. Continue reading “Write a function using reference variables as arguments to swap the values of a pair of integers.”
Posted on January 15, 2024January 15, 2024Write a program to enter marks of 6 different subjects and find out the total mark (Using cin and cout statement) Continue reading “Write a program to enter marks of 6 different subjects and find out the total mark (Using cin and cout statement)”