| Computer Science 3718 | Programming in the Small |
|
Contact Information
|
Marking scheme
You must pass the final exam to pass the course. Late assignments will only be accepted on medical or bereavement grounds. Documentation must be provided. |
Textbook
Object-Oriented Software Development Using Java, principles, patterns, and frameworks. Addison Wesley, 2000, ISBN 0-201-35084-X.
Topics covered in this course
Calendar
| Wednesday, September 5th, 2001 | First class |
| Monday, October 8th, 2001 | Thanksgiving Day. No lectures. |
| Wednesday, October 17th, 2001 | Midterm |
| Monday to Tuesday, November 12th to 13th, 2001 | Midterm Break |
| Friday, November 30th, 2001, Friday | Last class. |
Web Links
Notes
a2ps -o t.ps Circuit.java.
You can then send t.ps to your favorite printer.Assignments
Circuit.java example.
sort method using
insertion sort. The second class should use selection sort.
Either create a new test class or modify RandomArray to benchmark
the three sorting methods. These sorting methods are
Arrays.sort(Object[]) and the methods based on insertion sort
and selection sort. Measure the performance for the following sizes:
1000, 10000, and 100000.
Comment on the performance of the three sorting methods.
Draw a UML class diagram that describes the classes used in a software system to generate inventory and sales reports for a door-to-door vacuum cleaner sales company. The company is composed of a head office and a collection of sales people. Each sales person is responsible for a route. Each sale person has an inventory of vacuum cleaners. Each vacuum cleaner has a model name and price. The sales person records when each vaccum cleaner is sold and the name of the customer that bought the vacuum cleaner.
Besure to identify all classes, their attributes and methods.
Assignment 5, Due Nov 16th before 10:00am
Write a Java application that renders (displays) a simplified version of
svg.
The simplified version only supports the
elements: svg,
rect, circle, ellipse,
line, polyline, polygon, and
text.
The geometric shape elements should support the attributes:
stroke and fill. The stroke attribute
specifies the color of the outline of the shape. The fill
attribute specifes the color of interior of the shape. A value
of "none" means that the interior is not filled. Possible color values
include: red, green, blue,
black, white.
The individual attributes supported by the shapes are specified below.
java.awt.Component. This class should also implement
java.awt.print.Printable interface to allow capture of
the display.
Consider the following part of the track.xml document:
<track>
<location>
<date> 06-Oct-2001 </date>
<time> 15:07:21 </time>
<latitude> N47 20 44.7 </latitude>
<longitude> W53 03 53.9 </longitude>
<altitude> 231.814941406 </altitude>
</location>
<location>
<date> 06-Oct-2001 </date>
<time> 15:07:38 </time>
<latitude> N47 20 34.7 </latitude>
<longitude> W53 04 12.0 </longitude>
<altitude> 221.721191406 </altitude>
</location>
</track>
You should convert all of the children elements of location to
attributes of the location. The converted output should be:
<track>
<location
date="06-Oct-2001"
time="15:07:21"
latitude="N47 20 44.7"
longitude="W53 03 53.9"
altitude="231.814941406" />
<location
date="06-Oct-2001"
time="15:07:38"
latitude="N47 20 34.7"
longitude="W53 04 12.0"
altitude="221.721191406" / >
</track>
The output does not have match this example exactly.
Test your program with smalltrack.xml.