0% found this document useful (0 votes)
3 views2 pages

Programming Problems

The document outlines five programming problems that require the design of C++ programs using inheritance concepts. Each problem focuses on different domains such as e-commerce, banking, education, smartphone functionality, and online learning platforms, emphasizing the use of multilevel or multiple inheritance. The programs are expected to manage and display relevant information for users, sellers, bank accounts, students, smartphones, and instructors.

Uploaded by

habibamushtaq142
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Programming Problems

The document outlines five programming problems that require the design of C++ programs using inheritance concepts. Each problem focuses on different domains such as e-commerce, banking, education, smartphone functionality, and online learning platforms, emphasizing the use of multilevel or multiple inheritance. The programs are expected to manage and display relevant information for users, sellers, bank accounts, students, smartphones, and instructors.

Uploaded by

habibamushtaq142
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Programming Problems

1. An e-commerce company is developing a software system to manage its users and sellers.
Every user in the system has basic information such as username and email and can log
into the system. Some users become sellers who can create a store and add products for
sale. Among the sellers, some are premium sellers who receive additional benefits such as
advanced analytics and a premium badge. Design a C++ program using multilevel
inheritance where the base class represents a user, the derived class represents a seller, and
the final derived class represents a premium seller. The program should allow input of
relevant information and display all details of a premium seller using appropriate member
functions.

2. A bank wants to develop a software system to manage different types of bank accounts.
Every account has basic information such as account number and balance and supports
operations like depositing money. Some accounts are savings accounts that also include an
interest rate and a function to calculate interest on the balance. The bank also offers a
premium savings account that provides additional benefits such as cashback offers and
special account privileges. Create a C++ program using multilevel inheritance where the
base class represents a general account, the second class represents a savings account, and
the final class represents a premium savings account. The program should demonstrate how
a premium account can access all features of the previous classes.

3. A university is designing a system to store and manage information about its students.
Every person in the system has basic details such as name and age. A student is a person
who also has additional academic information such as roll number and department. Some
students pursue postgraduate studies and are categorized as graduate students who have
research details such as thesis title and supervisor name. Develop a C++ program using
multilevel inheritance to represent this hierarchy of information. The program should allow
the user to enter the details of a graduate student and display all personal, academic, and
research information.
4. A technology company is developing software for a modern smartphone device that
integrates different functionalities. The smartphone should be able to perform basic phone
operations such as making calls and sending messages. At the same time, it should also
support camera features such as taking photos and recording videos. Since the smartphone
combines both phone and camera capabilities, the software design should use multiple
inheritance. Write a C++ program where one class represents phone features and another
class represents camera features, and a third class called smartphone inherits features from
both classes. The program should demonstrate how the smartphone can use all these
features.
5. An online learning platform is being developed to manage teaching and course delivery.
The system contains a class that manages teacher information and another class that
manages course information such as course name and duration. In the platform, an
instructor may teach multiple courses, so the instructor entity needs access to both teacher
and course information. Design a C++ program using multiple inheritance where one class
stores teacher details and another class stores course details, and a third class represents an
instructor that inherits from both classes. The program should allow entering data and
displaying complete instructor and course information.

You might also like