For this lab you are required to work in a group of 4-6 members. Your instructor will tell you how to form the groups. Each group must work on a single computer so that you will be able to print and turn in your work at the end of the lab. If you did not attend the previous lab, your instructor will assign you to a group. If the person whose computer you used during the previous lab is not present, you must choose another group member to type and submit your interfaces/classes.
Objective
In this lab you will implement the classes for the WaitingLine family of components based on the interface design you did in the previous lab and the code that you worked on for the homework.
Setup
For this lab, you will use the same project you used in the previous lab. The same team member should edit the project in Eclipse. (If that student is not present, another team member will have to set up the project following the instructions from the previous lab. Once the project is restored to the state in which it was at the end of the previous lab, including the creation of the component.waitingline package and of the WaitingLineKernel and WaitingLine interfaces, you can continue with this lab.)
Method
Please follow the steps outlined below carefully. Your team's goal for this lab is to come up with a consensus on the implementation of the WaitingLineSecondary and WaitingLine1 classes, and make sure that they are typed into Eclipse, free of syntax errors, and documented clearly and precisely. The Additional Activities will offer you the opportunity to test your implementations.
- To start today's activity, you should review any feedback provided on Carmen for the interfaces you designed in the previous lab. If you need to make any changes to the WaitingLineKernel and WaitingLine interfaces, do this first. Then share your homework and review each team member's implementation and make sure you note the similarities and differences between your solutions. Once every team member work has been considered by the entire team and everyone on the team has had a chance to review everyone else's code you can continue.
- As a team, start editing the project. Here are some
specific steps:
- Make sure you have updated the WaitingLineKernel and WaitingLine interfaces to incorporate any feedback for the previous lab on Carmen.
- Create a new class in the components.waitingline package in the src folder and name it WaitingLineSecondary.
- Edit the new class according to the implementation agreed on by your entire group. Make sure that all the Javadoc documentation is accurate and that the name of each team member is included in a separate @author tag in the Javadoc comment for each class (and interface). Talk to an instructor if you have any questions.
- Create another class in the components.waitingline package in the src folder and name it WaitingLine1.
- In the new class, implement the WaitingLineKernel methods (including the Standard methods). A straightforward implementation can be done by using a Queue or a Sequence as the only representation field. A good starting point for this is the Queue implementation on Sequence you did for an earlier lab. You can copy the code from that component into WaitingLine1 and just edit it to complete this part of the lab. Make sure the Javadoc documentation is updated appropriately.
- When your group has completed the lab, call an instructor to show your work and get feedback on your work. You are required to print the WaitingLineKernel.java, WaitingLine.java, WaitingLineSecondary.java, and WaitingLine1.java files to PDF and submit them in Carmen before you leave the lab. You should also make sure that each team member has a copy of all the classes and interfaces you produced together; emailing them or copying them to a USB flash drive are possible ways to share the work.
Additional Activities
- Design a JUnit test fixture for the methods defined in your WaitingLineKernel and WaitingLine interfaces. As the starting point, you could use the JUnit test fixture you were provided with for Queue implemented on Sequence in the Queue Implementation on Sequence lab.
- Test your implementation of the WaitingLine components.