CIS112 Assignments:

Your will have time to do quizzes during class time, we will use quizzes as discussion topics.
Homework assignments are generally due the next class. For self-test questions, don't look at answer in the back, make all attempts to answer questions by reading book, reviewing lecture notes and discussing questions with others. Self test assignments should be structured as a study guide, either re-write the question or include question in answer.

  Assignment Due Date
0 Fill In Student Questionnaire and E-mail it to me. If you use lab computer make sure you delete your original file. 1/23/02
1

Why was structure programming invented?
What are some of the features of a structure program?
What does OOP stand for, how does it relate to structure programming?
Is OOP more important now than structure programming was in the 80's?
What are four ways of implementing OOP in Java?
When writing a new class what are some of the most important concerns?


Due 1/30/02 5:15PM
But will give extra time
to 2/1/02 5:15PM

2

Create new class EggBasket2 modifying EggBasket1
EggBasket2 should put eggs in cartons containing an even dozen. Print out how many dozen cartons you have, and also determine how many and something to do with remaining eggs.

Due 1/30/02 5:15
But will give extra time
to 2/1/02 5:15PM

3

Write class count, program has three counting methods, myForCount,
myWhileCount, myDoWhileCount, each method counts from 1 to N (where N can be between 1 and 10). Each method will use the respective, for, while and do while loop. Output of the program can be in one of three formats: Arabic 1..10, roman I..X, or English text one..ten. Type of format should be determine by value of a class object-variable. You are required to implement a case statement, string array and if statement within your class.

1/30/02 End of Lab
4 Add method fixedShippingCosts to class CostOfItemsForSale
2/6/02 5:15
5

Create ItemWeight class, class accepts name of item as string and returns weight. Modify class CostOfItemsForSale to compensate for weight of items,
Derive your own linear equation to compute costs.

2/6/02 End of Lab
Chapter 8
6 Programming Exercise 1 page 572 2/13/02 End of Lab
7 Self Test Questions Page 524, 1-11 2/13/02 5:15
8

Modify DivideByZero2.java so that tidalWaveException only occurs when
Quotient Exceeds 10,000; Also modify the program so that negative number
exception occurs whenever either the numerator or denominator is negative

2/20/02 End of Lab
9 Self Test Questions Page 527 12-13, 535 14-20 2/20/02 5:15
     
10 Self Test Questions Page 548 21-27; and Page 553 28-29 2/20/02 5:15
11 Page 574 Programming Exercise 4 C & Above for Extra Credit
12 Chapter 9 Self-Test Questions 1-7 2/27/02
13 Chapter 9 Self-Test Questions 10-13; 14-16; 17-18 3/6/02 5:15
     
14 Finish WordCount.java 2/27/02 End of Lab
15 Programming Assignments Self Test Question 41 Page 653 3/6/02 End of Lab
16

Programming Exercise 1 page 659 Do Only the Text File Version

3/13/02 End of Lab
17 Programming Exercise 2 page 659 Do Only the Text File Version 3/13/02 End of Lab
Chapter 10
18

Using MyVector.Java as an example. Write your own version of MyVector.java, your version must implement 10 vector methods and store three types of objects. You may be as creative as you desire.

3/20/02 End of Lab
19 Self Test Questions 1-6, 8-10 3/20/02 5:15
20 Self Test Questons 11-12,14,15-18 4/3/02
21 Programing Exercise 3 Page 717 4/3/02 End of Lab

Assignment are structured so you can follow assignments B or C
Advantages of Following Track B:

Book is not really teaching Java, Java is on object oriented language with polymorphism and inheritance,
Book is sidestepping these concepts, battleship is not, It is an object oriented programming using polymorphism and inheritance. Second, look at UCSD site, assignments at UCSD are substantiately harder than the book, battleship is geared to be as hard as the individual students wants it to be. In its basic form it serves as a good stepping stone between a UCSD assignment and traditional or at the high end equivalent to an UCSD assignment. Third, in real world you will work with large (50K-100K) existing programs. Battleship is a medium size program.

Track C is accomodate students too busy with other courses, or who aren't quite ready to tackle a medium sized program.

22C

If 22 is too hard, you may write your own version of LinkListedDemos that
mirrors StringLinkedListDemo2.java but with a lot larger data set.

4/10/02 End of Lab
23 Self Test Page 732 Problems 1-3, page 739 4-6; Page 749 8-10 4/24/02
24C Programming Exercise 6 Page 753 4/17/02 End of Lab
25 Programming Exercise 1 Page 752 4/17/02 End of Lab
     
26 Page 761 Self Test 1-2; Page 772 3-7; 8-12; 13-17 5/8/02
27C Programming Exercise 1 page 841 5/8/02 End of Lab
28 Page 811 Self Test 23-34, Page 818 35-39 5/15/02
29 Page 864 Chapter 13 Self Tests 4-7 Dropped and not on test
     
 
 
Battleship - Term Project
22B

Write your own Battleship player - Implement the method makeMove & placeShips in your PlayerN class, where N is the number you have selected on the signup sheet. You will need to implement messages relative 'Single User Test Mode' and 'Head to Head Combat' Extra Credit: (1) Find Bugs in Battleship Code; (2) Devise significant battleship upgrades; (3) Check with me about adding upgrade on your own (4) Your player exceeds 'Single User Test Mode' 6.0 performance rating.

4/10/02
24B

In tournament mode, after Head to Head combat is completed, your player will be passed a message IDSeriesRating, this messages signifies that the SeriesRating class is completed. Use SeriesRating.getHead() to get the head pointer of this class, step through the link list, and write your own statistics to disk. You should be creating the private method fileStat. Why is this method private? Keep in mind that PrintSuperClass allows easy file writing. Extra Credit: Come in with a competive player. Able to defeat, Palomar Hall of Framer (14-15 Year Old or First Student to Defeat Me), be a top class player or defeat my pride and joy AceInTheHole; Extra Credit: (1) Find Bugs in Battleship Code; (2) Devise significant battleship upgrades; (3) Check with me about adding upgrade on your own

4/17/02
25B Using the head pointer to SeriesRating.getHead(), write a recursive routine that steps thru each link node in the list. Your program should read the number of win vs losses for the series. Using PlayerSkill statistics (methods) you should be able to determine, if the win loss of the series correctly represents the players capabilities. For this assignment you can also use the battleship code to read the files PerformanceRating.dat and SeriesRating.dat, these two files represents statistics from the tournament mode on our web-site, you don't need to write a player of makeMove to read these files, simply use bpi to determine how to read these files. After you have written a program for interface to the battleship class, write a short synposis on any unusually findings in the last tournament mode. 5/8/02
27B Write a frame interface for Battleship, either for DebugMode or Tournament

5/15/02