Create the object then insert to the data structure

Assignment Help Computer Engineering
Reference no: EM132077699

OBJECTIVES Doing this lab, students have the chance to:

-Review the concept of Hashtable data structures

-Know how to implement the Java Hashtable class: use functions, put, get, remove, etc.

-Know how to read the information of the object from an input file, place to the Hashtable object and write the information of all the nodes in the structure to the file before terminating the program

-Know how to display all the nodes in the Hashtable on the screen

Part1: Java class Hashtable REQUIREMENT The company A stores the information of all employees in the text file named as employeeInfo.txt. The information of each employee is written on one line in the following format, for example:

For the employee:

Bill - White - 0012345 - Marketing department - 45000

Or for the employee with the tittle:

Nancy - Nguyen - 1234567 - Sale department - 40000 - Manager

The application will use Hashtable object as data structure then open and read the file employeeInfo.txt The information of each line of the file employeeInfo.txt as a node to be inserted to the data structure. After reading the file, ensure all the information of employees or title employees are stored in the data structure by showing all nodes.

Provide the menu to allow users to select the following tasks. After finishing each task, re-display the menu to allow user to continue using the application:

1. Insert employee or employee with title

2. Fetch

3. Encapsulation

4. Update

5. Delete

6. Show all

7. Exit

//INSERT data to the Hashtable

-Allow users to enter the information of an employee or an employee with the title from the keyboard

-Create the object then insert to the data structure -Users can continue inputing until users want to stop

//FETCH data -Allow users to type an employee id then read the information from the data structure to print out the information on the screen

//ENCAPSULATION -Allow users to type an employee id from the keyboard. Using the entered employee id to read the information of the node from data structure then assign the information to the node named "temp". Change the salary of the node temp

-Fetch the node with the entered employee id again then compare its salary with the salary of the node temp. . If the salary are different then display the message box: "The Java Hashtable structure has the encapsulation"; otherwise display the message box: "The Java Hashtable structure does not have the encapsulation"

//UPDATE data Display the message to ask users to enter the employee id. Using the employee id to read the node out the data structure. Asking for the new department from the keyboard. Change the department with the new department. Display the node from the data structure to check new updated information

//DELETE data Display the message to ask users to enter the employee id. Remove the node with the entered employee id

//SHOW ALL Display all the nodes are currently stored in the data structure
//Exit program When users choose to exit the program, open the file employeeInfo.txt to write and write all the information of employee nodes stored in the data structure to the file employeeInfo.txt Close file

ANALYZING AND DESIGNING -Draw the UML of class Employee_yourLastName and class TitleEmployee_yourLastName -Write the pseudo-code of the main()

PART2: Linear Quotient (LQHashed) Data Structure OBJECTIVES Doing this lab, students have the chance to:

-Implement the Linear Quotient (LQHashed) data structure: understand Insert, Fetch, Delete and update algorithm of the LQhashed structure -Know how to display all the nodes in the LQHashed data structure on the screen

REQUIREMENT Provide the application that creates a data structure of type LQHashed then provides the menu that includes the following tasks and allow users to work on each task until users want to exit

1. Insert

2. Fetch

3. Encapsulation

4. Update

5. Delete

6. Show all

INSERT data -read input information of employees or title employees from the keyboard then create the object and add to the data structure until users want to stop.

FETCH data -Display the message to ask for an employee id then Fetch the node from the LQHashed data structure to node named temp and display the information of node

ENCAPSULATION -Use the above node fetched from the LQHahsed data structure, change the salary of temp -Fetch employee with the same employee id again to see if they have the same salary then display display the message box: "The LQHashed structure has the encapsulation"; otherwise display the message box: "The LQHashed structure does not have the encapsulation"

UPDATE data

-Display the message and read the employee id then fetch the node to node temp

-Read the new department from the keyboard, update the new department to temp

-Update the new node to the data structure

DELETE data -Display the message and read the employee id then using the employee id to delete the node

SHOWALL -Display all the nodes currently stored in the data structure

ANALYZING AND DESIGNING -Write the pseudo-code of the main()

Reference no: EM132077699

Questions Cloud

The mars program development environment : The program should begin by loading the contents of four signed integer operands (A, B, C, and D) from memory into registers.
Find confidence interval for mean monthly expense budget : A sample of 20 international students attending an urban U.S. university found that the average amount budgeted for expenses per month was $1612.50.
Write a function that takes a rectified waveform : Write a function that takes a rectified waveform and returns a waveform that approximates an RC filter output.
Discuss julian birkinshaw on management innovation : Discuss Julian Birkinshaw on management innovation based on the videos below. Julian Birkinshaw discusses the challenges and methods of management innovation.
Create the object then insert to the data structure : Create the object then insert to the data structure -Users can continue inputing until users want to stop.
Negative aspects of an organization : Power and politics are often thought of as negative aspects of an organization, yet both are a means by which objectives
How much will santiago have to put away : Santiago plans to save for vacation to Brazil in 1.5 years. He will be putting the money into a short-term investment a account earning 4 percent compounded.
Determine the fraction defective in sample : Using samples of 194 credit card statements, an auditor found the following: Use Table-A. Sample 1 2 3 4 Number with errors 4 6 5 8 a.
What quantity the first order should be released : Use the least total cost lot-sizing method to determine when and for what quantity the first order should be released.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Questionconfiguring a databasethere are two parts to this

questionconfiguring a databasethere are two parts to this work. the first part is to generate a database and some

  What other error-detection techniques are available

What other error-detection techniques are available? How do they compare to parity and cyclic redundancy checksum?

  Define what are the threats to networks

Why networks are venerable to attacks. What are the threats to networks

  Express the java code necessary to allow only one connection

express the JAVA code necessary to allow only one connection.

  Marketing idea into a product design proposal

As a Design Engineer working for the Bahrain Design Company. You are assigned to follow the design stages, in order to develop a marketing idea into a product design proposal.

  What is the system bus and what are its main components

What is the system bus? What are its main components? What is a bus master? What is the advantage of having devices other than the CPU be bus masters?

  Cfl pumping lemma

Utilize the CFL pumping Lemma in order to show each of these languages not to be context-free.

  Suppose that you worked for a small company developing

assume you worked for a small company developing web-based software. further assume that your company presently makes

  Design circuits for half and full subtractors

Design circuits for half- and full subtractors. The half-subtractor has two inputs and two outputs (DIFFERENCE and BORROW). The full sub-tractor has three input

  Describe your expectations on finding law from anywhere

On the discussion forum, describe your expectations on finding law from anywhere in the world by use of the internet.

  Threats against network services

Users are familiar with some network services like HTTP (Hypertext Transport Protocol) - the Web; and SMTP (Simple Mail Transport Protocol) and POP (Post Office Protocol) - e-mail and instant messaging.

  How many service provider types does itil identify

How many service provider types does ITIL identify? What is this? "The result of carrying out an activity, following a process, or delivering an IT service." Which of the following statements about ITIL Services is NOT true?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd