Question: Hello. I would like to solve task,4,5 today. Please, with details Task1: Write the implementation of the global (not member) method removeElements(StackList S1, int x)

Hello. I would like to solve task,4,5 today. Please, with details

Task1: Write the implementation of the global (not member) method removeElements(StackList S1, int x) that takes a stack and integer value x, and then removes elements from the stack until finding the value x or the stack becomes empty. The method should return the stack after modification.

Example: S1 =

98

11

76

23

12

After executing the method removeElements (S1, 23 )

S1:

23

12

Task 2: Write the implementation of the global (not member) method WrapQueue(QueueList Q1, int x). The method takes a Queue and integer value X, and then wraps the queue according to the given value.

Example: Q1 =

32

12

5

6

7

After executing the method WrapQueue(Q1, 3 )

6

7

32

12

5

Note: Use the methods defined in the Queue ADT, (enQueue(int val), deQueue(),first()).

Task3: Write the implementation of the global (not member) method RevQue(QueueList Q1, int x). The method takes a Queue and integer value X, and reverses the order of the first X elements in the queue. The method should use the Stack structure to reverse the elements order.

Example: Q1 =

50

44

11

22

33

After executing the method RevQue(Q1, 3 )

11

44

50

22

33

Task4: Use Big-O notation to analyze the efficiency of the methods that you implemented in tasks 1, 2, and 3. Write the time complexity (in terms of Big-O) for each method as a comment in the source code file.

Task 5: Using the data structures you have learned in this course, develop a management system for students' records in the college. The system should enable users to efficiently store, process/update, and track students records. In order to achieve this, design and implement the appropriate structures/Classes/Interfaces/methods with space/time efficiency in mind

The main functionalities of the system:

  1. Insert: inserts a new student record in the system
  2. Retrieve: searches for a student record using a key value/attribute.
  3. Process: performs processing tasks. The major processing tasks are: assigning a new GPA, modifying Mobile No, change Speciality.
  4. Print: Prints students' records
  5. Delete: deletes a student record in the system
  6. Track: Allows to back track the latest updated/processed students' records

For each student record, you need to include the following attributes (you can add more attributes as needed):

(Studentid, Name, Birth Date, Mobile, Address, Specialty, GPA)

  • Draw the class diagrams for the system.
  • Implement and test the system. Use a driven menu to display the above requirements properly.
  • Design and Implement each of the following data structures along with their essential operations:
  1. Implement a Singly Linked List to store all students' records.
  2. Implement a Stack for tracking the updated/processed records.
  3. Implement a Queue for handling the processing tasks of students records.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!