Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Score Scheme:
1.
2.
3.
4.
5.
Attendance
= 10 marks
Error free Print out
=
5marks
Ability to run the program
=
2marks
Ability to code in Java
= 5marks
Ability to identify/adjust the
source code to produce the
desired output
= 3marks
6. Ability to answer programming
questions = 5marks
Total = 30marks
1. Stack
Sketch
a. Pile of Books
b. Paper on a printer Tray
c. Reversed word
Operations:
a. Create(A)
b. Push/Add(A)
c. Pop/Delete(A)
d. Top/Peek(A)
e. Isemty(A)
Illustration:
Implementation:
Implementation:
b. Linked list
Linked List-based
implementation provides the
best (from the efficiency point of
view) dynamic stack
2. Queues
A sketch:
Operations:
1.
2.
3.
4.
5.
Create(B)
Enqueue/Add(B)
Dequeue/Delete(B)
Front(B)
Isempty(B)
Circular Queue:
Circular Queue:
Circular Queue:
Circular Queue:
4. Lab Exercise
Using the above program,(not the one you will
download from the internet) re-write/adjust the
source code to fit the operations of Stacks and
Queues based on their properties.
Note1: You may need another class for Queues or
you may decide to adjust the test program to fit
Queues.
Note2: There are lots of pitfalls in the source
code e.g wrong variable names, unused
variables, and erroneous logical implementations
not akin to Stacks/Queues. The much you identify
and adjust increases your score.
Lab Exercise
Note3: Print your source code with your
names , reg.no and department on the
Comment part of your source code. DO
NOT USE PEN TO WRITE THEM ON YOUR
PRINT OUT.
Note4: Come with a fully charged and
functional laptop for defence (individually)
Note5: Defence Date---------------Negotiable!!
THURS 23RD TO FRI 24 TH JULY 2PM DAILY