Professional Documents
Culture Documents
PS 2: Create a class cylinder with radius and height as data member and perform the
addition of two cylinders using constructor overloading.
Cuboid 1 Cuboid 2
Display the Cuboid 3 with the difference between Cuboid 1 and Cuboid 2, and print the
Volume of the Cuboid 3. Write the C++ program using friend function?
Cuboid 3
PS 4: Write and test the following function that returns through its reference
parameters both the maximum and the minimum values stored in an array:
PS 6: Imagine you are the salesperson in the supermarket and arranging the apples based
on their size (in kgms) every day. One fine day, you decided to scan all the apples size
and arrange it in less time than ever before. The scanner measured the apple’s size, for
example, Apple 1 = 1.4 kgms and 1 kgms, Apple 2 = 1.8 kgms and 2 kgms. This made you
arrange two patterns: Pattern 1 – apple size measured in float, Pattern 2 – apple size
measured in integer. Design a C++ program to implement this given use case?