Skip to content

kkg1999/OOPLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ :

ASSIGNMENT 1:

1. Design a class TIME which stores hour, minute and second. The class should have the methods to: input time in 24-hour format / AM/PM format, display time 24-hour format / AM/PM format, add minute with a time value.

2. Design a COMPLEX class, which will behave like normal integer with respect to addition, subtraction, accepting the value and displaying the value.

3. Design an item list class with item code, name, rate, and quantity for several items. It must support the methods to : add a new item in the list, issue an item, update rate / quantity of an item, display the price and quantity of an item, check the availability of an item.

4. Design a STUDENT class to store roll, name, course, admission date and marks in 5 subjects. Provide methods corresponding to admission date and receiving marks, preparing mark sheet. Support must be there to show the number of students who have taken admission.

5. Design an ARRAY class with following support : (i) add two arrays (ii) multiply an array with an integer (iii) access array elements with [] operator (iv) assignment 

6. Design a string class with the following methods : (i) assign/initialize one object with another (ii) '+' to concatenate two strings (iii) '==' to check equality

7. Modify the string class so that without physically coping when assign/initialize an object

8. Design a TOLLTAX class to store the number of cars that crossed the bridge and total amount collected.
It must support the methods : receiving toll, display number of cars that crossed the bridge, display the amount of toll collected.

9. Design a BALANCE class with account number, balance and date of last update. Consider a TRANSACTION class with account number, date of transaction, amount and transaction type. If it is a withdrawal check whether the amount is available or not. Transaction object will make necessary update in the BALANCE class.

10. In a bank two types of accounts are there savings and current. For savings account a minimum deposit of Rs. 500 are to be kept. In current account overdraft up to Rs. 20,000 is allowed. Each transaction is noted. Design and implement the necessary classes.

ASSIGNMENT 2:

1. Write a program that simulates flipping a coin repeatedly and continues until three consecutive heads are tossed.
2. Pascal's triangle.
3. In a library, books, and journals are kept. Journals are issued to faculty members only. A student member can have 2 books issued at a time. For faculty members it is 10. For late return student members are charged Rs. 1 per day. Faculties are not charge. For journals additional information like issue no., date of publish, volume no., etc., are to be stored. For any transaction, members are supposed to place transactions slip. After necessary validations, transaction is carried out. Each transaction is to be noted into a register. Implement the system described above after designing the necessary classes. Use necessary files to store and retrieve information. Support should be there for date validation.
4. Implement priority queue with linked list.
5. Implement prim's algorithm using priority queue.

C++ Project Assignment:

1. Implement stack with two queue
2. Implement queue with two stack.