Modify Department where needed to use getEmployees to iterate over the list of employees.

You will need the appropriate constructors. In addition, you may also implement other methods that may be useful for the assignment (where possible define code in just one place).

 

Part II:

 

Write a program to thoroughly test all of the methods of your LinkedItemList class.  Once you are confident is it working correctly, proceed to part III.

 

Part III:

 

On the tomcat drive in cosc310 you will find an eclipse project called assmt2.  On importing this project you will find a program CompanyReport which is similar to the Company and Bank projects.  That is they use arrays for 1 to N relationships between business objects.  Make the following modifications to CompanyReport to use ItemList and LinkedItemList.

 

1)     Change the Company class to use LinkedItemList for your list of departments (instead of using an array).   Define the type of the departments variable to be a ItemList.  You will need to modify for loop accordingly.

 

2)     Change Department to use LinkedItemList for the list of employees (instead of an array).  Define the employees variable as a ItemList of Employees.

 

3)     Remove the method getEmployee(int index) from Department.  Instead add an ItemIterator getEmployees() method.  It just calls the iterator method on the employees variable and returns its ItemIterator.  Modify Department where needed to use getEmployees to iterate over the list of employees.

 

 

Additional Requirements:

  1. Place ItemList and LinkedItemList into package edu.iup.cosc310.util
  2. Provide a fast implementation for appendItem(), e.g., does not need to walk the list to get to the end.
  3. Provide a fast implementation for getNoItems(), e.g., does not need to walk the list to count the number of items.

 

Deliverables:

 

  1. A zip file named lastname2.zip containing all source files and class files.  For example, if your name is John Smith, the file name should be smith2.zip.
  2. Printout of all source files (need only the sources you wrote or changed).
  3. Printout of the output from your test program and CompanyReport program.

 

 

All papers must be submitted as a single packet and stapled in the upper left corner.

Last Completed Projects

topic title academic level Writer delivered

Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.

Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.

[order_calculator]