List of Programs Subject Code: PCS-307 Subject: OOP Using C++ Programming Lab
List of Programs Subject Code: PCS-307 Subject: OOP Using C++ Programming Lab
List of Programs Subject Code: PCS-307 Subject: OOP Using C++ Programming Lab
Sample Output:
Input number of terms: 5
9 99 999 9999 99999
The sum of the Series = 111105
3. Write a C++ program to sort a given array of 0s, 1s and 2s. In the final array put all
0s first, then all 1s and all 2s in last.
4. Create a Java program to perform survey on four different model of Maruti
(Maruti -K10, Zen-Astelo, Wagnor, Maruti- SX4) owned by person living in four
metro cities(Delhi, Mumbai, Chennai & Kolkatta). Display tabulated report like
format given below:
Delhi
Mumbai
Cheenai
Kolkatta
5. The daily maximum temperatures recorded in 5 cities during the month of January
(for all 31days) have been tabulated as follows:
Cities
10
8. A class Telcall calculates the monthly phone bill of a consumer. Some of the members of
the class are given below:
Class name:
Data members/instance variable : phno(phone Number), sname(subscriber Name )
n(number of calls made) and amt (bill amount).
Member function/methods:
TelCall() : Parameterized constructor to assign values to data
members.
Void compute( ) : to calculate the phone bill amount base on the slabs given
below.
Void display( ) : to display the details in the specified format.
Example:
15. Write a C++ program to use scope resolution operator. Display the various values of the same
variables declared at different scope levels.