This page is obsolete. If you see it, please report to the professor The correct page for 2012 is this one.
For all of these assignments, see the official syllabus for master deadline dates and lab times. Note that these instructions and the dates are subject to change; any changes will be announced to students by email and/or on the course home page. Such announcements supercede anything shown in the syllabus.Note: Answers to these questions will not, generally, be posted on the web in any form. This is necessary since students in other universities are also doing these exercises. The answers will, however, be discussed in detail by your lab TA, when the assignments are handed back.
Handing in assignments: Your TAs will give you instructions about how to hand in assignments. The TAs will deduct 10% for late assignments, plus 0.5% extra for every hour they are late, and will refuse to accept any that are handed in after the answers have been discussed in class.
Marking method and discussion of results: Your lab TA will mark the assignments and hand them back in the lab period. If you have complaints about the marking, please first discuss the problem with the TA who marked it. Only come to the professor once the TA has looked at an assignment and has written a comment on it that says he/she refuses to change it.
Rules on cheating and working together: The individual assignments must be done strictly on your own; you may only ask the TA for help. The group assignments must be done only with your partner and you must both share the design, programming and writing work. Any sharing or copying of any part of your work with others will result in an immediate 5% penalty on your final course grade as well as zero on the assignment. TAs will be instructed to immediately report any cheating to the professor. As an additional disincentive to cheating, midterm and exam questions will relate to the labs and assignments.
This will be handed in as assignment 1, by 5 p.m.on Fri Sep 23 2010.
Group work and partners: In this lab, and all other labs that involve programming, you will work in groups of two. If you have not previously arranged to work with someone in your lab section, then you will have to find someone immediately. If there are an odd number of students, the TA may permit an individual to work alone for now. No groups of 3 will be permitted.
Seating: In the early labs, each group will use one computer, although you will need an extra computer when you are doing later labs involving client-server work.
Saving work and accounts: Your TA will give you any needed help regarding setting up your account. Before you leave the lab each day, make sure you have saved your work.
Using Eclipse: You will be using Eclipse in this lab. Instructions on how to get started in the lab can be found here.
Exercises to do: Work on the following exercises from the textbook. You must hand in only one copy of answers per group. Make sure the names and student numbers of both partners are clearly indicated. You must work on these questions during the lab and then finish off the work on your own time.
Hint: To measure execution time of a method, you can execute it many thousands of times, and then find the elapsed time in milliseconds. You should execute each design enough times so the program takes about 10 seconds to run. Look in the Java documentation for the currentTimeMillis() method. To test two different designs you can simply run the code, timing the results for the first design. Then edit the code to use the new class (and constructor), and compile and run it again. We suggest you run each version several times to ensure that your results are consistent. If they are not consistent, take the median result as your definitive result and list the other results..
Hand in answers to the following. It is suggested that you do the questions from Chapter 2 by October 1, and do the question from Chapter 5 around Oct 4 after we have covered the material in the lectures
This will be handed in as assignment 3, by 5 p.m.. on Oct 14, 2011.
Note you have a reasonably long amount of time to do this; I suggest you get as much as you can done in the lab period during the first week and second week, and then start working on it as homework so that the final week you are only asking the TA some leftover questions.
Group work and partners: For this lab, you may have a different partner from the one you had for the first lab, but please only do so after discussing with your TA and your previous partner, so we don't end up with partners that are stranded. In other words, do not abandon your partner without ensuring your partner has someone else to work with. You must work with the same partner from this point onwards in the course, unless your partner drops the course.
Purpose of the lab These lab questions are designed to help you become very familiar with the design of the SimpleChat program and the OCSF framework. You should read the relevant sections of the textbook before coming to the lab. You will be tested on your understanding of SimpleChat and OCSF in the midterm.
Exercises to do: You will do exercises listed below from pages 104-107 of the textbook with a few modifications to ensure that the work you do is a little different from the work of last year.
The Umple lab instructions are online at this location. This is a Word file, since I want you to be able to cut and paste some code, while preserving the indentation. Open the file and then use a web browser and Eclipse as you work your way through the lab.
There is no lab report for this lab, however attendance will be taken, and a mark will be given for this if you show the TA your results when the instructions tell you to.
Due Nov 1, 2011, 17:00. This is an individual assignment. You must work strictly alone on this.
Create a class diagram for the following system.
You are creating a software system to be used by independent garages, where mechanics fix cars and light trucks.
The first part of the system will be a large data store that contains information about most common vehicles, as obtained from the manufacturers and others. Each vehicle type has the following information: Its manufacturer, model year, model name, and trim line name. There is list of part types that are used in vehicles of many kinds (e.g. battery, sumer tires, winter tires, spark plugs, interior mirror, etc.). These are organized in a part-of hierarchy to facilitate browsing (e.g. spark plugs are part of the engine). Next, there is a list of specific products that can be purchased and installed in vehicles. The system tracks which part types are allowed to be installed in which vehicle types. For example a certain model of Toyota RV4 might allow only certain battery types to be installed.
The final component of the system is the part that tracks specific vehicles, customers and work performed. Customers can bring in their vehicles for repairs. The system must track the various work done and the parts that are purchased and installed in each vehicle. It is up to you to refine the requirements for this part of the system.
You should consider using UmpleOnline to create your model. You may hand in both the Umple textual code and a picture of the diagram. If you want, however, you can use a different UML tool.
Show all associations, attributes and generalizations.
The server responds to the commands in some way. The server will likely also have to send commands/acknowledgements back to the client. You can either also create a simple graphical user interface for the clients or else make a simple textual UI, but add some other feature of your choice in the server. The TA will judge your work based on quality, amount of work, and innovative ideas.
You can assume that all the data will simply be saved in the memory of the server (i.e. Java objects. I.e. you will not need to worry about making the data persistent, although if you do that (e.g. using Java persistence, then you will get a 1-point bonus on your overall course assignment component).
Here are some examples of basic, reasonably straightforward applications:
For assignment 7, do the following:
Please hand this in by 5 p.m. Fri Nov 25 2011.