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

Assignment Section A

The document describes two assignments involving data structures. The first asks the student to create a program modeling a three-floor parking garage with different car types assigned to each floor. The program should use queues to manage parking and retrieving cars from each floor. The second assignment asks the student to create a stack data structure using Student objects, with relevant methods and testing code in a separate file. The assignments must be completed individually and submitted by the provided deadline using an object-oriented approach.

Uploaded by

Uzair Razzaq
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Assignment Section A

The document describes two assignments involving data structures. The first asks the student to create a program modeling a three-floor parking garage with different car types assigned to each floor. The program should use queues to manage parking and retrieving cars from each floor. The second assignment asks the student to create a stack data structure using Student objects, with relevant methods and testing code in a separate file. The assignments must be completed individually and submitted by the provided deadline using an object-oriented approach.

Uploaded by

Uzair Razzaq
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Note: Don’t email the soft copy on my personal address; just upload on CU-

Online.

Q.1:
This assignment is about effective use of data structures that might leads to make a prototype of your
daily life problems.

Suppose there is a Car Parking Garage that asked you to write a program about their car parking
garage. This garage has three floors A, B and C each floor has capacity of parking 7 cars at a time. Each
floor has been associated with one type of cars as described below and each type of car has same
specifications and condition in first level of assignment:

Civic: A
Corolla: B
Accord: C

Your assignment must contain followings:

Explanation:

Three floors should base on Queue. You have to write a class that contains three queues that might
represent three floors. Whenever user came to park his/her car, your program should ask user about the
type of car and car should be parked in the associated floor if there is empty space. On wrong entry of
model your program should display some message and asked user to enter type again.

First Level:

1) Your program should display the status of floors every time a car will be parked.
2) Whenever a car will be parked it must be placed while following the rules of Queue.
3) Whenever user wants his/her car back you should follow the rules of queue.
4) Your program should exit when users wants.
Q.2

Create a stack that uses Student objects as its input.

Hint: The easiest way to implement this ADT .


The Student objects should have Student ID, First Name, Last Name, Date of Birth, Contact
Number, Address, and Program as its data members. It also should have relevant constructors,
setters and getters for all data members, as well as a method to display all data in a Student object.
The selection of data types of the data members are left to you.
The ADT stack will use the Student objects as data and will perform all of its operations using this
data.
Write a main function and test all your stack methods. This function should be written in a separate
file.
Note: You may use the pointer-based implementation of the ADT stack.

All the work must be done in object oriented approach.

Important Note

Two persons working independently on same assignment can never write same things.
Assignment must be submitted in soft form before 30 th of November 04:00pm sharp.
No queries will be entertained in any case after provided deadline.
Copying and cheating will lead towards zero marks or more.

You might also like