0% found this document useful (0 votes)
57 views

Journal of Object Oriented Programming and Data Structure

The document contains 20 programming problems involving classes and data structures. The problems involve creating classes for bank accounts, students, points in a plane using polar coordinates, times, dates, vehicles, shapes, employees, stacks, queues, and conversions between infix, postfix, and prefix expressions. Students are instructed to write programs to solve each problem using classes and objects, print out all programs, include an index in a specific format, submit all programs punched in a yellow transparent file by October 5th, 2021.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Journal of Object Oriented Programming and Data Structure

The document contains 20 programming problems involving classes and data structures. The problems involve creating classes for bank accounts, students, points in a plane using polar coordinates, times, dates, vehicles, shapes, employees, stacks, queues, and conversions between infix, postfix, and prefix expressions. Students are instructed to write programs to solve each problem using classes and objects, print out all programs, include an index in a specific format, submit all programs punched in a yellow transparent file by October 5th, 2021.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Date:-09/09/2021

Lab Assignment of OOP and Data Structure


Sr.No. Problems
1. An electricity board charges the following rates to user.
For the first 100 units 60p per unit.
For the next 200 units 80p per unit.
Beyond 300 units 90p per unit.
All users are charged a minimum of Rs. 50; if the total amount is more than
300 then an additional surcharges of 15% is added. Write a program to accept
name of user consumed and print charges with their rates.
2. Define a class to represent a bank account. Include the following members:
a. Name of the depositor b. Account number
c. Type of Account d. Balance amount in the Account
Member Functions:
a. To assign initial values.
b. To deposit an amount.
c. To withdraw an amount after checking the balance.
d. To display name and balance.
Write main program and handle accounts of 5 customers.
3. Program to create a class person having members name and age. Derive a class
student having member percentage. Derive another class teacher having member
salary. Write necessary member function to initialize, read and write data. Also
write the main function.
4. Program to create a class name student having date member name, no & three
marks. Write a member function to input name, roll no & marks & calculate
percentage.
5. Design a class polar which describes a point in the plane using polar co-
ordinates radius and angel. A point in polar co-ordinates is show: X=r*cos(a)
Y=r*sin(a) A=atan(X/Y) R=sqrt(X*X+Y*Y)
6. Create one class time which has hour, minute and second as data member. Now
write input function to input class values and find time in the form of
minute.
7. Write a program to create two classes: DATE and DMY and both classes are
building to handled dates. The difference between them DATE class handles it
in string. Where as the DMY class handles it has three integers representing day.
8. Create a class called "Vehicle" which contains data members registration
number and fuel type Make getdata() function to input data value. Create class
"two-Wheeler" from vehicle which contains data member’s distance and mileage
Make getdata() function to input data. Use overloading techniques for getdata()
function and display the information with fuel used.
9. Write a program that consist of two classes Time12 and Time24. The first one
maintains time on 12 hour basis, whereas the other one maintains it on 24-hour
basis.
10. Create two classes DM and DB which store the values of distance. DM stores
distance in meters and centimeters. DB stores distances in feet and inches. Write
a program that can read values for the class object and add one object of DM
with another object of DB. Use a friend function to carry out the addition
operation and this function will display answer in meter and centimeters.
11. Write a program to maintain a telephone directory use add() and Show()
methods to add new entries and display the telephone numbers of a person when
the name of the person is given(No need to use data files).
12. Create a base class shape use the class two store double type value that could be
used to compare the area. A drive to specific classes called triangle and
rectangle. From the base shape and a member in get data to the base class to
initialize base data member and another function display area.
13. Create a class EMP which contains a data members Name of employees, EmpNo
and Basic Salary Take appropriate member function and getdata into class then
after write data into data file. All EMP INFO display the information of all
employees of a file. Use read and write function for a file.
14. Write Program to implement Stack Operations like PUSH, POP, PEEP,
UPDATE and DISPLAY using class and object.
15. Write Program to convert Infix to Postfix Expression using class and object.
16. Write Program to convert Infix to Prefix Expression using class and object.
17. Write Program to implement Simple Queue Operations like Insert, Delete and
Display.
18. Write Program to implement Circular Queue Operations like Insert, Delete and
Display using class and object.
19. Write Program to implement Double Ended Queue Operations like Insert, Delete
and Display using class and object(To Perform Input Restricted).
20. Write Program to implement Double Ended Queue Operations like Insert, Delete
and Display using class and object(To Perform Output Restricted).

Note :-
(1) Journal Submission Date :- 5/10/2021.
(2) You are requested to printout all the programs.
(3) Index is compulsory in the given format only.
(4) You are requested to submit all the programs in the given format only.
(5) You must submit in it “Yellow Transparent Punching File.” No other file color is
accepted.

Prepared by
Dr. Vimal Vaiwala
Prof.Nainesh Gathiyawala

You might also like