CSCI 102 Homework Assignments - Spring 2008
| Assignment |
Assigned Date |
Due Date |
Points |
| `Homework 1 |
1/28 |
2/10 |
25 |
| Homework 2 |
2/11 |
2/24 |
30 |
| Homework 3 |
3/3 |
3/13 |
25 |
| Homework 4 |
3/24 |
4/8 |
40 |
| Homework 5 |
4/9 |
4/29 |
50 |
Assignment Grading
Unless you get permission from your TA, or from the professor, the late submission penalty is as follows:
- One day late: 15% penalty
- 2 days late: 30% penalty
- 3 days late: 45% penalty
- More than 3 days late: zero points
Student Code of Conduct
The official USC code of student
conduct clearly discusses what is acceptable and not acceptable for
submission of homework. It also states the penalties associated with various
violations.
I would like to make it clear, that it is NOT ACCEPTABLE to submit any code,
FROM ANY SOURCE - whether a friend, or whether found online, as part of your
own homework or lab submission.
Since you have this significant warning, there will be NO EXCUSES ACCEPTED.
If you are found cheating, you WILL receive an F for the course and be reported to the
Office of Student Judicial Affairs.
Design Document Requirement
The link below is to the template for the design document. Like what is done
in the labs, EVERY lab and homework assignment, unless otherwise stated,
requires a design document. The design document must also describe the
ALGORITHM that is used for a function that you write. Not just the inputs and
outputs.
Design Document Template
Assignment Details
Homework 1 - Fantasy League Team Registration System
You've been hired as a contract programmer by a company to write a Fantasy League Team
Registration System for some kind of fantasy sport. You've already had a couple of
meetings with your "boss" and have learned the following:
- Each Fantasy League has the following characteristics:
- League name
- Name of the sport, e.g., baseball, football, Quidditch, etc.
- Number of teams in the league
- League manager - manages trades, schedule, statistics, etc.
- Maximum number of players on a team
- Minimum number of players on a team
- Each Team in the fantasy league has the following characteristics:
- The team "owner"
- A group of players - no more than the league allows
- The league it belongs to
- Each Player has the following characteristics:
- All the characteristics of regular people
- A position
- Allow the user to print out two summary reports:
- Summary of a league: The league summary information at the top followed
by a listing of all the team names and their owners.
- Summary of a team: The team summary information at the top followed
by a listing of all player names and their position.
You are to build the system so that leagues can be created. Once a league exists,
teams can be added to the league. Once a team exists, players can be added
the the team. You are likely to want some kind of menu choice for the user to
select what they wish to create: league, team, player, etc. If the user wants to
create a team, you must display the list of leagues that have been created.
The same can be applied to adding players to a team. You get to decide, but
remember you want the user interface to be convenient for the user.
A league must have a manager. A team must have an owner.
A team must also have at least the minimum number of players and
no more than the maximum number of players.
Grading
- Design document: 5 points
- Creation of leagues: 4 points
- Creation of teams: 4 points
- Creation of players: 2 points
- Nice formatting and proper output of league summary report: 3 points
- Nice formatting and proper output of team summary report: 4 points
- Code comments: 3 points
Submission
All assignments are to be submitted electronically - including your design
documents. To submit your work, you must be logged into aludra.usc.edu - in
your Unix account. We use the submit program to do the actual submission. The
command line you must enter to submit your work is:
submit -user csci102 -tag hw1 MYFILES
Where MYFILES is the list of file names that you are submitting. DO NOT
submit your compiled code, just your source code and design documents. Also,
submit a file called COMPILE. This is the instructions for the TA/LA on how to
compile and run your problems
Homework 2 - Fantasy League: Playing Games and Scoring
You are to add a Schedule to your league. A Schedule is a list of games that
are to be played between 2 teams on a certain date. You are to prompt the
user for all data needed to make up a schedule - which 2 teams and what date the
game is to be played. Store the schedule with the league it is for.
Also, you are to use your own templated linked list class in this assignment.
DO NOT use the STL vector class, or any STL classes, for this assignment.
You are to have a new schedule summary report. This will print the schedule
for a league. Any games that have been "played" are to show the score.
Lastly, you are to allow the user to select a scheduled game and enter the
score for the game. From the score you are to assign a win/loss to each team. A team's
record is now to be displayed for the summary reports - both league and team.
Grading
- Design document: 5 points
- Creation of schedules: 4 points
- Entering of scores for "played" games: 4 points
- Nice formatting and proper output of league schedule summary report: 4 points
- Display of a team's record in homework 1 summary reports: 3 points
- Use of your templated linked list classes: 2 points
- Code comments: 3 points
Submission
All assignments are to be submitted electronically - including your design
documents. To submit your work, you must be logged into aludra.usc.edu - in
your Unix account. We use the submit program to do the actual submission. The
command line you must enter to submit your work is:
submit -user csci102 -tag hw2 MYFILES
Where MYFILES is the list of file names that you are submitting. DO NOT
submit your compiled code, just your source code and design documents. Also,
submit a file called COMPILE. This is the instructions for the TA/LA on how to
compile and run your problems
Homework 3 - Making a Scroller
You are to use EzWindows to build a "game" that scrolls. For this first assignment, you
are to build the scrolling part of your game. You are to have "things" (you get to decide what
they are) that show up and move across the screen. They can all move at the same speed, for now.
You are to have 5 different things. They are to show up randomly and then scroll.
Each of your scrolling "things" is to be represented by a class. Items that are being
scrolled are to be stored in your templated list class. When an item is no longer
on the screen, it is to be removed from its list.
Grading
- Design document: 6 points (include a description of your game and each thing)
- Creation of things randomly and put into (and remove from) list: 8 points
- Scrolling: 8 points
- Code comments: 3 points
Submission
All assignments are to be submitted electronically - including your design
documents. To submit your work, you must be logged into aludra.usc.edu - in
your Unix account. We use the submit program to do the actual submission. The
command line you must enter to submit your work is:
submit -user csci102 -tag hw3 MYFILES
Where MYFILES is the list of file names that you are submitting. DO NOT
submit your compiled code, just your source code and design documents. Also,
submit a file called COMPILE. This is the instructions for the TA/LA on how to
compile and run your problems
Homework 4 - Scroller Game Version 1
You are to turn your homework 3 into the first version of your scroller game. This means
you must make the following enhancements:
- Users must be able to "play" your game. That means either using the mouse,
or using the curses capability to use the keyboard to give commands. By interacting,
they must have to do something to get points. It can be hitting your moving items, avoiding the
scrolling items by moving something up and down, etc.
- Your scrolling "things" cannot just be simple rectangles/ellipses/lines. They must
look, in some recognizable way, like the thing they represent. You can use images, or draw
more complex shapes with the draw methods in EzWindows.
- You must display the player's score on the EzWindows screen.
- A player must have a finite amount of lives. You may have an invincible mode, but
that cannot be the only game mode. When a player fails to kill/avoid something, they are
to lose a life. Have the game do something appropriate when a player dies. Also allow for restarting the game.
- Your scrolling items are not to all move the same way, or the same speed. Each thing
should have its own movement capability.
- Your game should speed up as time elapses. This is to eventually make it too hard for a human to play.
Grading
- Design document: 6 points (include a description of your game and each thing)
- Game can be played - mouse or keyboard interactions: 6 points
- Quality of scrolling items: 5 points
- Player score maintained and displayed on screen: 2 points
- Player lives managed/game restart on death: 2 points
- Variation in scrolling item movement: 8 points
- Game speeds up as time elapses: 4 points
- TA's enjoyment in playing your game: 4 points
- Code comments: 3 points
Submission
All assignments are to be submitted electronically - including your design
documents. To submit your work, you must be logged into aludra.usc.edu - in
your Unix account. We use the submit program to do the actual submission. The
command line you must enter to submit your work is:
submit -user csci102 -tag hw4 MYFILES
Where MYFILES is the list of file names that you are submitting. DO NOT
submit your compiled code, just your source code and design documents. Also,
submit a file called COMPILE. This is the instructions for the TA/LA on how to
compile and run your problems
Homework 5 - Final Scroller Game
For your last homework assignment, you are to add the following capabilities to
your scroller game:
- At least 1/4th of your "things" shoot back at you.
- Three (3) different screens - these may represent 3 worlds/levels, etc.
This can be done with different backgrounds and different (or at least some
different) "things". They are to look, and act, differently.
- Twelve (12) different "things". Some of which are good for you (add to lives/score,
and some that are bad for you. Each of these is to have their own movement/shooting, etc.,
capabilities
Grading
- Design document: 10 points (include a description of your game and each thing)
- 3 screens: 15 points
- Quality of scrolling "things": 5 points
- Player score maintained and displayed on screen: 0 points (from hw 4)
- Player lives managed/game restart on death: 0 points (from hw 4)
- Variation in scrolling item movement: 10 points
- TA's enjoyment in playing your game: 5 points
- Code comments: 5 points
Submission
All assignments are to be submitted electronically - including your design
documents. To submit your work, you must be logged into aludra.usc.edu - in
your Unix account. We use the submit program to do the actual submission. The
command line you must enter to submit your work is:
submit -user csci102 -tag hw5 MYFILES
Where MYFILES is the list of file names that you are submitting. DO NOT
submit your compiled code, just your source code and design documents. Also,
submit a file called COMPILE. This is the instructions for the TA/LA on how to
compile and run your problems