Last updated on 5/7/2003 8:37:06 PM

Dmitri Kaznachey, Ph.D.
Manager, Architecture
Portfolio Analytics and Research
Fannie Mae, Washington, DC
e-mail:
dmitri_kaznachey@fanniemae.com; dkaznachey@yahoo.com
(202) 752-3344 work; (703) 278-2849 home

CS 332 Object-Oriented Specification and Implementation
Spring 2003
001 Wednesday 4:30 p.m. – 7:10 p.m. ENT 175
Office hours: by appointment (SITE II, Room 435)

Schedule | HW #1 | HW #2 | HW #3 | HW #4 | HW #5

Text Book

Object-Oriented Software Development Using Java by Xiaoping Jia, Addison-Wesley, 2002.

Modern C++ Design by Andrei Alexandrescu, Addison-Wesley, 2001. (Optional)

Course Description

This course covers basic to intermediate knowledge on object-oriented design and programming. The emphasis is on transition from formal design of abstract data types(classes) to their implementation in an object-oriented language (Java, C++). The main topics include: object-oriented modeling in UML, programming in Java, application frameworks, design patterns, generic programming. Students will practice on projects involving design and implementation of different systems in Java.

Grading

5 home works including projects (4 best scores):

40%

Midterm exam: 

20%

Final exam:

30%

Class participation:

10%

 

Bonus points worth 10% credit will be awarded for doing some extra work on assignments. Answering challenging questions during the class will result in bonus points (up to 3) for class participation. The maximum possible total score to receive in class is 110.

 

No make-ups will be offered for exams and home works. Once the grade for a home work or a midterm exam is announced, a one-week grace period is allowed to discuss the grade with the instructor. No grade  adjustments will be made after the grace period.

Teaching Assistant

Praveen Patibandla

ST2, Room 365

ppatiban@gmu.edu

Office hours: 1-3 Tuesday, Thursday

Tentative Schedule

January 22

Ch.1: Introduction to Software Development

January 29

Ch.2: Object-Oriented Modeling Using UML

HW #1 assigned

February 5

Ch.3: Java
HW #1 due

February 12

Ch.4: Java
HW #2 assigned

February 19

CANCELED

February 26

Ch. 5: Java

March 5

MIDTERM EXAM

HW #2 due

March 12

NO CLASS - SPRING BREAK

March 19

Ch.6: Building Projects

HW #3 assigned

March 26

Ch. 8: Collections Framework

HW #3 due

April 2

Ch.8: Input/Output Framework

HW #4 assigned

April 9

Ch. 7: Design Patterns

HW #4 due (April 13)

April 16

Ch. 7,10: Design Patterns

HW #5 assigned

April 23

Ch. 7,10: Design Patterns

April 30

Generic Programming in C++

HW #5 due (May 4)

May 7

Generic Programming in C++

May 14

Final Exam 4:30 - 7:15

Home Work #1

Due by: February 5, 2003 by e-mail to TA or hard copy in class.

 

1. (10 points) Develop an object-oriented model for a university online system (problem 2.4 in the text book) that has the following functionality:

 

1)      Students can browse courses offered by the university and the schedule.

2)      Students can add and drop classes.

3)      Instructors can get the roster of a class and enter grades for each student in a class.

 

Submit the following:

 

2. (Bonus 1 point) Convert the class diagram to Java classes and run it. The goal of this exercise is to test class interfaces, not functionality.

Home Work #2

Due by: March 5, 2003 by e-mail to TA at ppatiban@gmu.edu.

 

1. (10 points) Write an applet that retrieves students data and displays various charts. The data is represented in the following XML format:

 

<data>

            <student>

                        <name>MyName</name>

                        <age>23</age>

                        <gpa>3.5</gpa>

                        <major>CS</major>

            </student>

            ...

</data>

 

The applet should load students' data as in this link and display age, GPA (2.0-3.0, 3.0-3.5, 3.5-4.0 categories), and major pie charts. The data from the above link can either be stored in a file with an applet, or as a hard coded string inside the applet. See page 201 of the text book for an example on how to read a file in an applet using URL.

 

Submit the following:

 

 

2. (Bonus 1 point) Use an XML parser to process data.

Home Work #3

Due by: March 26, 2003 by e-mail to TA at ppatiban@gmu.edu.

 

1. (10 points) Define and implement an interface for a queue (see problems 6.4 and 6.6 in the text book), which supports the following methods:

 

The implementation should conform to the canonical form and contain assertions for each method.

 

Submit the following:

 

 

2. (Bonus 1 point) Implement an applet that displays various shapes. Use your queue class to store shape definitions.

Home Work #4

Due by: April 13, 2003 by e-mail to TA at ppatiban@gmu.edu.

 

1. (10 points) Design and implement a class Car that describes the key characteristics of a car (see problem 8.2 in the text book), such as model, model year, manufacturer, color, horsepower, number of cylinders, and so on. The natural order of the car objects is based on the ascending orders of the following attributes of the cars in descending significance:

 

 

Write a program that does the following:

 

 

Submit the following:

 

 

2. (Bonus 1 point). Create a graphical user interface for the above project using Swing framework.

Home Work #5

Due by: May 4, 2003 by e-mail to TA at ppatiban@gmu.edu.

 

1. (10 points) Design and implement an application that reads a file with shapes described by a color and a set of points, draws each shape on a screen and outputs its description to a file. For example, a red line segment and a blue square are represented as:

 

RED (0 1) (2 3)

BLUE (0 0) (0 2) (2 2) (2 0)

 

The application should recognize a line segment, a rectangle, and a square. They should be represented in the output as follows:

 

LINE <start-point> <end-point>

RECTANGLE <lower-left-point> <height> <width>

SQUARE <lower-left-point> <width>

 

The shapes can be drawn as colored points, or as points connected by colored lines. Use Java Swing to draw the shapes. All parameters of the application such as input and output file names, a display delay; background color, etc. should be specified in a configuration file.

 

Submit the following:

 

 

2. (Bonus 1 point). Submit the homework by April 30, 2003. Only one submission is allowed!

 

Java Information: