Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem description Ever since the return from the pandemic after Covid-19, the lecturers from a prestigious university have noticed that the students have boosted their

Problem description Ever since the return from the pandemic after Covid-19, the lecturers from a prestigious university have noticed that the students have boosted their cheating game in quizzes by planning beforehand with the students sitting in front and behind them. Hence, the lecturers have decided to create a new alphabetically sorted seating arrangement for each quiz, only showing the arrangement 5 minutes before the quiz. It is important to note that the number of students in a class is never fixed, and each quiz has different students taking it. Which also means that each time for an quiz, students can be removed or added from one quiz to another and only release these names before each quiz. In this way, the students would not know who is sitting in front of them or behind them before an quiz; which reduces the chances of them planning their cheating process beforehand. However, the students are trying to outsmart the algorithm and determine how they can find the names quickly so they can strategize their cheating mechanism. Problem breakdown Consider a list of students where each student in the list has information (such as Name, ID, Major) assuming that the students name is unique (no duplicates). Note that, you need to implement your own Student class. Your task is to implement a program that helps a given student to find the students X and Y, where X would be the student information behind the given student and Y is the information of the student in front of the given student considering that the students are seated in alphabetical order. This could be done very quickly as the students have limited time to figure out the arrangement and strategize before starting the exam. You are asked to implement this project twice, each with a different data structure in order to easily find out the names of students sitting before and after a given student in a test. One of your implementations must allow a list insertion and deletion of complexity of O(logn) in the general scenarios. Also, its worth noting that the complexity of best sorting algorithm is O(n logn). Your testing program must have a menu with three options: Add a student to the list. In this option, the user should enter the student information and add it to the list. Remove student from the list given his/her name. In this option, the user will enter the students name and it will get deleted from the list. Find front and back students of a given student. In this option, the user will enter the name of a student, then the information of the students in front and back of the given students will be displayed on the screen. Exit

Please solve this problem using queue structure in java(NOT HEAP).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions