ability to Describe several applications for various data structures.ability to Describe several applications for various data structures.Java Programming

course learning outcomes (CLOs):

CLO (1.2, 1.2) ability to Describe several applications for various data structures.

CLO (1.1, 1.2) ability to Recognize several different ways to implement data structures.

CLO (2.1, 2.2, 2.3) ability to Write programs that support various data structures.

CLO (2.1, 2.2, 2.3) ability to Analyze objects and data structures composed of objects.

Q1: Complete the following code segments and state its functionality: (6 Marks, 2 each)

protected class QueueNode



What the method does:

public void initializeQueue()



What the method does:

 public DataElement front() throws QueueUnderflowException



What the method does:

Q2: Write Java code for each of the following: (4 Marks, 2 each)

Stack practices:

a.      Creating a Stack and Performing basic operations like push, pop and peek

b.      Other Stack Operations

  • Check if the stack is empty.

  • Find the size of the stack.

  • Search for an element in the Stack.

Q3: Answer the following: (14 Points)

Process Burst               Time                Priority

P1                    10                    3

P2                    1                      1

P3                    2                      3

P4                    1                      4

P5                    5                      2

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0

  1. Draw Gantt charts illustrating the execution of these processes using FCFS, SJF scheduling.

  2. What is the waiting time of each process for each of the scheduling algorithms in part A?

  3. Which of the schedules in part A results in the minimal average waiting time (over all processes)?

  4. What are the problems that might be encountered in SJF scheduling algorithm?



Instructions Files

Java Programming Experts

Neno S.
Java Programming

60 Answers

Ray Bjork
Java Programming

90 Answers

View More Experts

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

259 Experts Online