Qu 1: You are assigning to develop a project in which you have to achieve following goals.
- Write a program for creating Laptop.
-
Name,Price,Processor,RamandHard driveshould be defined in base class asconstant. - You need to inherit these functionalities in your program and Print Details.
- All the laptop should have different name, price, processor, ram and hard drive.
Your output should be like this
Name : Lenovo
Price : $1000
Processor : i3
Ram : 2GB
HDD : 500GB
*************************************
Name : Dell
Price : $1500
Processor : i5
Ram : 4GB
HDD : 1TB
*************************************
Name : Sony
Price : $2000
Processor : i9
Ram : 8GB
HDD : 1TB
************************************* _
Summary
In this programming Exercise you learned how to use constant value in inheritance. In the next chapter, you will learn Delegates and Events.
In this chapter you will learn to solve inheritance problem using codes. There are some programming question are there that you have to solve.