Student ID at Qatar University is composed of year of admission and students number. In this...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Student ID at Qatar University is composed of year of admission and students number. In this project, we aim to implement a structure that improves operations of inserting and searching for a student. To enhance these operations when using tree data structure, we will use hash table that contains trees (treeTable) where each tree holds only data of students admitted in a specific year. Figure I illustrates this concept: 6 We will keep data for 20 years so the table length is 20, and your hash function will be h(year)= year% 20. Using linear probing implement the following functionalities in treeTable: Implementation: 1- Each node in the tree will hold an object of type Student. 2- Student class has: id (int), name(String), address(String), GPA (double). 3- You should have one class that implements the structure above, call it tree Table which has the following methods: a) void insert(Student). This method inserts students in the appropriate tree based on his id. b) Student find (int). It receives an id, and returns student record with that id, or it returns null if it was not found. c) boolean remove(int). It receives student' id, removes his record if found and returns true, or returns false if it was not found. d) printStudent (int): it receives an integer number represents the year, then prints students' data who were admitted in that year using inoder approach. e) printAll(): this method prints all students in the tree Table using preorder to print the students in each tree. f) student WithGPA(double): it returns array list of all students whose GPA is below the received parameter. 4- Your main application should have a menu with the following functionalities: a) Add new student: which prompts user to enter student's data, then insert it to the treeTable. b) Search for a student: which prompts user to enter an id then search in treeTable and display the result. c) Delete a student: which prompts user to enter a student id, then remove his record, or display a message indicating this student was not found. d) Display students' data: which prompts user to enter a year, then display students' data of that year. e) Display students with less GPA: it prompts user to enter a number, then display students' data whose GPA is less than the input value. f) Save to file: which saves tree Table to a file. g) Load data: which loads data from a file to treeTable. 5- Using GUI in your program will allow you for 10% bonus. Student ID at Qatar University is composed of year of admission and students number. In this project, we aim to implement a structure that improves operations of inserting and searching for a student. To enhance these operations when using tree data structure, we will use hash table that contains trees (treeTable) where each tree holds only data of students admitted in a specific year. Figure I illustrates this concept: 6 We will keep data for 20 years so the table length is 20, and your hash function will be h(year)= year% 20. Using linear probing implement the following functionalities in treeTable: Implementation: 1- Each node in the tree will hold an object of type Student. 2- Student class has: id (int), name(String), address(String), GPA (double). 3- You should have one class that implements the structure above, call it tree Table which has the following methods: a) void insert(Student). This method inserts students in the appropriate tree based on his id. b) Student find (int). It receives an id, and returns student record with that id, or it returns null if it was not found. c) boolean remove(int). It receives student' id, removes his record if found and returns true, or returns false if it was not found. d) printStudent (int): it receives an integer number represents the year, then prints students' data who were admitted in that year using inoder approach. e) printAll(): this method prints all students in the tree Table using preorder to print the students in each tree. f) student WithGPA(double): it returns array list of all students whose GPA is below the received parameter. 4- Your main application should have a menu with the following functionalities: a) Add new student: which prompts user to enter student's data, then insert it to the treeTable. b) Search for a student: which prompts user to enter an id then search in treeTable and display the result. c) Delete a student: which prompts user to enter a student id, then remove his record, or display a message indicating this student was not found. d) Display students' data: which prompts user to enter a year, then display students' data of that year. e) Display students with less GPA: it prompts user to enter a number, then display students' data whose GPA is less than the input value. f) Save to file: which saves tree Table to a file. g) Load data: which loads data from a file to treeTable. 5- Using GUI in your program will allow you for 10% bonus.
Expert Answer:
Answer rating: 100% (QA)
Mainjava import javaioIOException import javautilScanner public class Main public static void mainStringargs throws IOException treeTable theTree new treeTable theTreeinsertnew Student201800003 Ali Mo... View the full answer
Related Book For
Accounting Information Systems
ISBN: 978-0133428537
13th edition
Authors: Marshall B. Romney, Paul J. Steinbart
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Consider the cash flows in Table P6.7 for the following investment projects (MARR = 15%). Determine the annual equivalent worth for each project at i = 15% and determine the acceptability of each...
-
1. The following data were collected on scores (out of a possible 100) for a pretest in quantity methods. Using Excels statistical functions complete the following questions. (a) What are the means...
-
Facebook Inc. included the following disclosure note in an annual report: Share-Based Compensation (in part) . . . compensation expense related to these grants is based on the grant date fair value...
-
Dan Oliver worked as an accountant at a local accounting firm for five years after graduating from college. Recently, he opened his own accounting practice, which he operates as a corporation. The...
-
A made a contract to construct a house for B. Subsequently, B sued A for breach of contract. A raised the defense that the contract was not binding because it was not sealed. Is this a valid defense?...
-
The Joan Company uses the process cost system and average cost method. The following production data are for the month of July, 20--. Production Costs Work in Process beginning of the month:...
-
Based on the information in The Art of Positive Communication EL. a TedTalk by Julien Mirivel, Answer the following questions: 1) Name and give a brief example for each of the 6 positive...
-
Zoids Toys Company provides you with the following miscellaneous data regarding their operations in 20xx. Gross Profit P 200,000 Net Loss (50,000) Sales 1,000,000 Direct Materials Used 350,000 Direct...
-
Karey bought a small shopping mall 10 years ago for a total price of $2 million. Karey chose to use straight-line depreciation and deducted $423,000 before the mall was sold for $2.5 million on...
-
Briefly explain one internal hedging technique that financial institution may use to manage interest rate risk. Why might it be impossible to eliminate the risk completely? Define each of the...
-
The Audio Partners team has called a meeting to discuss financial matters and has asked you to prepare a slide presentation that explains the purpose of time value in money in finance and how time...
-
Explain how the use of special journals will benefit you as an accountant. Date (May) Particulars 1 The landlord was paid $1500 as rent. 3 The inventory was purchased on credit from Ron Co. for $1500...
-
On August 1, 2022, Bruce opened a framing and art supply store. Prior to opening the business, he incurred the following costs: Legal fees related to setup $25,000 Office equipment 15,000 Interest...
-
The gravitational acceleration g at Earth's surface actually depends slightly on latitude: this means that a ball that is dropped at the equator will accelerate slightly differently than one that is...
-
You work as an operations consultant for a textile company. Your client has a well-established distribution system in the US market. The company has hundreds of stores and four distribution centers....
-
What is the accountants role in the computer acquisition process? Should the accountant play an active role, or should all the work be left to computer experts? In what aspects of computer...
-
Spring Water Spa Company is a 15-store chain in the Midwest that sells hot tubs, supplies, and accessories. Each store has a full-time, salaried manager and an assistant manager. The sales personnel...
-
Obtain the annual report of a company assigned by your professor. Read the management discussion and analysis section, and develop a balanced scorecard that reflects that companys vision, mission,...
-
An auditor's purpose in reviewing credit ratings of customers with delinquent accounts receivable most likely is to obtain evidence concerning management's assertions about a. Valuation or...
-
Which of the following ratios is least applicable to the audit of the valuation assertion of accounts receivable? a. Ratio of bad debt expense to sales. b. Current ratio. c. Accounts receivable...
-
In your audit of Ryan Company for the year ended December 31, 19X8, you note that the bank reconciliation for the Third National Bank Account contains a large unlocated difference, as shown below....
Study smarter with the SolutionInn App