explain the following program attached..
[wrong answers will be reported.. ]
(C++)
Attachments:
Answers
Answered by
0
Answer:
This program creates a class called phone and the class has 2 public members called cost and slots (both of type integer).
In the main method an object of Phone called Y6 and Y7 are created.
The cost of Y6 is set to 100 and the number of slots to 2.
Similarly The cost of Y7 is set to 200 and the number of slots to 2.
In the end This is printed -
Cost of Huawei Y6 : 100
Cost of Huawei Y7 : 200
Number of slots for Huawei Y6 : 2
Number of slots for Huawei Y7 : 2
Explanation:
picture-
Attachments:
Similar questions