Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

From the following list of Projects, choose one of them as your project #1:

1- Write a program that simulates the operation of a busy airport that has only two runways
to handle all takeoffs and landings. You may assume that each takeoff or landing takes 15
minutes to complete. One runway request is made during each five-minute time interval,
and the likelihood of a landing request is the same as for a takeoff request. Priority is
given to planes requesting a landing. If a request cannot be honored, it is added to a
takeoff or landing queue. Your program should simulate 120 minutes of activity at the
airport. Each request for runway clearance should be time-stamped and added to the
appropriate queue. The output from your program should include the final queue
contents, the number of takeoffs completed, the number of landings completed, and the
average number of minutes spent in each queue.

2- An operating system assigns jobs to print queues based on the number of pages to be
printed (less than 10 pages, less than 20 pages, or more than 20 pages but less than 50
pages). You may assume that the system printers are able to print 10 pages per minute.
Smaller print jobs are printed before larger print jobs, and print jobs of the same priority
are queued up in the order in which they are received. The system administrators would
like to compare the time required to process a set of print jobs using 1, 2, or 3 system
printers.
Write a program that simulates processing 100 print jobs of varying lengths using 1, 2, or
3 printers. Assume that a print request is made every minute and that the number of pages
to print varies from 1 to 50 pages. The output from your program should indicate the
order in which the jobs were received, the order in which they were printed, and the time
required to process the set of print jobs. If more than one printer is being used, indicate
which printer each job was printed on.

3- Write a client program that uses the Stack abstract data type to simulate a session with a
bank teller. Unlike most banks, this one has decided that the last customer to arrive will
always be the first to be served. Create classes that represent information about a bank
customer and a transaction. For each customer you need to store a name, current balance,
and a reference to the transaction. For each transaction, you need to store the transaction
type (deposit or withdrawal) and the amount of the transaction. After every five
customers are processed, display the size of the stack and the name of the customer who
will be served next.

4- You can combine the algorithms for converting between infix to postfix and for
evaluating postfix to evaluate an infix expression directly. To do so you need two stacks:
one to contain operators and the other to contain operands. When an operand is
encountered, it is pushed onto the operand stack. When an operator is encountered, it is
processed as described in the infix-to-postfix algorithm*. When an operator is popped
off the operator stack, it is processed as described in the postfix evaluation algorithm:
The top two operands are popped off the operand stack, the operation is performed, and
the result is pushed back onto the operand stack. Write a program to evaluate infix
expressions directly using this combined algorithm.

* Check the pdf file “Infix to postfix conversion algorithm.pdf”

Project Guidelines

You must follow these guidelines for all the projects that you work on in the data structures
course.

1. Submissions: You need to submit the following 2 items:

a. Source code: Compress your project folder. The folder must consist of all your source
code files. I will use this folder to run your application.
b. Project Report: This report contains assumptions, a UML diagram (Use the UML power
point file for more info about UML), Big-O of the significant functions, and references.
This report should be roughly between 2-3 pages (excluding the front-page).
2. Source code

a. You can use C++, Java, or C# to implement your project.


b. You MUST follow OOP style.
c. You need to submit all the files that are needed to run the project. In C++, for instance,
you will need to submit header files (.h) and cpp files.
d. Comment your code and choose meaningful variable and function names.
e. Follow a coding style consistently.
f. Don’t include the source code in your printed report. I will just look at it electronically.

3. Grading Policy

Factor Percentage
Whether the source code can compile, run, and do what is required. 60%
Class diagram 10%
Quality of algorithms: 30%
• Good performance of the functions.
• Well-documented source code.
• Meaningful variable names.
• Object-oriented source code.

You might also like