Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Programming Project

Write a JAVA program to solve the following problem. Your program should properly compile and run. Your code MUST follow the documentation style used in your textbook. You need to upload into Moodle the following:

• From this point on, each of your projects is expected to be composed of multiple source code files. Thus to organize these files, all of them have to be part of a single package. Your package name MUST match the directory containing your code file. Finally, you need to export your package as a .JAR file then upload this single file into Moodle. If you are not familiar with how to export your code into a .JAR file, please check the following link.

http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-33.htm

Very Important Note: Do NOT upload any other files into Moodle; just ONE file with the extension ".jar" that is it.

Problem Statement:

In this project, you are asked to write a Java application similar to the one you wrote in Project 2 that handles a list of employees employed by a certain company. Your code in project 2 had used the built-in functionalities of the LinkedList class defined in the Java Collection Classes. In this project, you will still use a LinkedList as the main data structure that stores your data but you will provide your own implementation of a class called RecLinkedLink. In doing so, all the required methods to be defined in your RecLinkedList needs to be implemented using recursive algorithms. In other words, method such as size(), replace(), add(), remove, etc. MUST use recursion to achieve it functions. (check chapter 5 for details).

As done before, we will assume that each employee is only represented by her/his first name. The names of all employees in this small company are stored in a given data file called empNames.txt which is posted on Moodle next to this project statement. Your program must do the following task:

1. Define your own recursive implementation of LinkList in a separate file called "RecLinkedList.java".

2. Create an object of RecLinkedList to be used in storing and handling employees' data.

3. Open the given file and read employee data into the RecLinkedList object. In doing so, your code needs to maintain the order of employee data in the input file.

4. Verify the content of the employee data (just read) by displaying them on the monitor using a traditional for loop along with appropriate output messages.

5. Invoke various methods of the RecLinkedList class to retrieve then display the first element and the last element of the list. Display appropriate messages on the monitor.

6. Invoke various methods of the RecLinkedList class to remove the last element then display the size of the list after the removal operation. Display appropriate messages on the monitor.

7. Display the current list contents using the enhanced for loop along with appropriate output messages.

8. Create a ListIterator object, iter, to be used in accessing the RecLinkedList contents.

9. Advance the iterator for five positions then display the current list item (using iterator method and NOT list method).

10. Insert a new employee called "Kelly" at the current iterator position then display the current list contents using the compact form to be used from this point on for any list content display. Hint, use the implicit toString().

11. Execute the iter.previous() method followed by using the iter.set() method to set the current element to Nancy. Then, display the current list contents.

12. Execute the iter.previous() method followed by the remove() method then display the current list contents.

13. In a separate file, create a helper class called HelpLists. This class need to have the code for two methods described below:

a. public void reverse(RecLinkedList strings). This method receives a RecLinkedList object as its parameter then linearly access all the elements in the object while pushing them in a STACK object. You need to use the STACK data structure that you just created to retrieve the data from the stack and display them in reserve order on the monitor.

b. public void FIFO(RecLinkedList strings). This method receives a RecLinkedList object as its parameter then linearly access all the elements in the object while inserting them in a QUEUE object. You need to use the QUEUE data structure that you just created to retrieve the data from the queue and display them in order on the monitor.

14. In your main class, create an object of type HelpLists class then use it in the following.

15. Invoke the reverse method to reverse the order then display the reversed list contents.

16. Invoke the FIFO() method in order to create a queue and use it to ensure that the order of the data in RecLinkedList will be displayed without change.

Text Book: DATA STRUCTURES- Abstraction and Design Using Java by ELLIOT B. KOFFMAN and PAUL A. T. WOLFGANG. THIRD EDITION.

Attachment:- Ziyad_Project.zip

Java, Programming

  • Category:- Java
  • Reference No.:- M92054065
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Java

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As