i Want code of these programs

Write your question here.

1. Create a class called Laptop
2. It has following member variables
a. Serial no of type int
b. Manufacturer of type string
c. Color of type String
d. Detachable of type bool
3. Create 3 objects of class Laptop and initialize all their values
4. Print all these values in a proper pattern

2nd Program

1. Create a class called Table
2. It has following member variables
a. Height of type float
b. Width of type float
c. Capacity of type int
d. Manufacturer of type string
e. Color of type String
3. Create 6 objects of class table and initialize all their values
4. Print all these values in a proper pattern
Great. What do you have so far?
closed account (48bpfSEw)
It's so simple!

Take an example of a class definition and re-model it:

http://www.cplusplus.com/doc/tutorial/classes/

Topic archived. No new replies allowed.