Call us at 0700-922-6559 or Click here

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.

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.”

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()

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()”

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.

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.”