Document 17719598

advertisement
RFHallCSS
Computer Studies
ICS3M1
Computer and Information Science
Final Project Outline
The Software Design Life Cycle
The software design life cycle is the following:
Stage
Description
Problem
The problem or situation is clearly articulated and all requirements of a
Definition
solution are specified. At this stage the means of solving the program
should be separate from the definition of the problem.
Analysis
The problem definition is further studied and various solutions or
actions are considered. Modifications to the problem definition may be
made at this stage, as the problem is further explored. A best
approach is selected for detailed design.
Design
The means of solving the problem are expressed as a specific detailed
plan.
Implementation The plan is translated into a real product. Support materials such as
documentation are created.
Testing
The product is thoroughly tested, errors are corrected and the product
is optimized where possible.
Maintenance
The product is put into use, updates are made as required.
Final Project
In this project you will work in groups of 1 or 2 to use the software design life cycle to
define, design and implement a VB program. In the process of planning and writing the
applet you will submit the following:
1. Problem Definition Report – [Communication ]
Describe the program that you are going to write from the user’s(client) point of view.
Describe in detail all the features of the program that will be experienced by the user.
Write it in third person, “The user will”… Remember to cover all aspects of the program.
You may use a screen capture as part of you submission and sample input and output.
2. Analysis Report – [Thinking Inquiry ]
List programming considerations that you have identified once your Problem Definition is
complete. These are details that you identify by analyzing your Problem Definition Report.
Limitations, assumptions, Input, Output all need to be included.
3. Design – [Thinking Inquiry / Communication]
Your program design must include a description of each major component of your program.
Include screen shots or a sketch of what the program is doing. Break it down the program
different parts and title the screen shot so that it corresponds to a title in your
documentation. List all variables and objects that will be used and the purpose of each.
The best computer is your mind
RFHallCSS
Computer Studies
4. Implementation –[ Knowledge Skills / Communication / Application]
Create the program that follows the specifications. Include documentation within the code
and include the limitation and document why the limitation exists. Ensure proper naming of
objects and variables as detailed in the Design stage. Indenting, image names and
description of the purpose of each.
5. Testing Report – [Thinking Inquiry / Communication]
You will submit a journal summary of what has been done to test all components of the
program. It is in journal format as you are to keep a summary of on-going testing as you
build the program. Include a list of errors that can and should occur.
The best computer is your mind
RFHallCSS
Computer Studies
INDEPENDENT PROGRAMMING PROJECT MARKING SCHEME:
Documentation
Comm.
Very little
documentation
Documentation is
not complete
Spacing
Easy to read
Comm.
Programing
Techniques
KU
No spaces
No indenting
Some spacing
and indenting
Documentation is
complete and
somewhat
descriptive
Proper spacing
and indenting
Uses
inappropriate
names for
objects and
variables
Program does
not work
properly
Uses simple
structures
Some appropriate
names for objects
and variables
meaningful
names for objects
and variables
Program does
work properly
Program works
with all possible
data
Uses embedded
structures with
purpose
Uses only some
commands from
class
Uses most
command from
class
Uses a wide
variety of
commands from
class
appropriately
Few challenges
attempted
Some challenges
met
Many challenges
in the project
Limited use of
new ideas
Some commands
used that not
covered in class
Many commands
and ideas not
covered in class
User interface
Comm
Difficult to
understand the
interface
Easy to
understand
interface
Descriptive and
attractive
interface
Efficiency of
program
TI
A lot of code
that is not
needed
Some code that is
not needed
No unneeded
code
Usefulness
App
Variety of
programming
structures
App
Use of
advanced
commands
and/or
structures
KU
Difficult
problems
Solves TI
Creativity
TI
Uses some
embedded
structures
Documentation is
descriptive and
easy to
understand
Very effective
spacing and
indenting
Descriptive and
informative names
for objects and
variables
Program handles
errors form the
input
Complex,
embedded
structures used
effectively
Uses a wide
variety of
commands from
class and out side
research
appropriately
Problems are
overcome
independently
Research and
programming
ideas create a
cool app
Descriptive,
attractive, well
organized and
effective interface
Very effective use
of code
All the developed programs will have to include and will be marked on the following:
a)
Usefulness and intricacy (level of difficulty) of the program. (25%)
b)
Variety of structures and features used. Depth of language solutions (more marks
will be assigned for more
advanced language features and solutions). (25%)
c)
Proper programming techniques and documentation: i.e., proper code structure,
most efficient code, blank
line between blocks of statements, proper indentation, internal documentation
(commenting of structures,
The best computer is your mind
RFHallCSS
Computer Studies
proper aligning of comments), clarity of solutions, adherence to conventions,
external documentation.
(25%)
d)
Friendly, logical and appealing user interface. (25%)
EXTERNAL DOCUMENTATION
Header
Program name
Author
Course
Teacher
Hardware
Software
Date Completed
SUGGESTED PROBLEMS??? Use if you are stuck
Any other proposal must be discussed with the teacher and approved by
him. The problem chosen should be embellished with your own ideas to
make the solution more universal, comprehensive and interesting;
however, make sure your proposal(s) is/are acceptable to the teacher.
1. A snooker/billiard game that follows appropriate rules.
2. A graphics action game.
3. A combo of casino games.
4. Caesar codes replace each letter of a message with a letter x positions along in the
alphabet. If x = 5, then a is replaced with e, b with f, and so on. Note that z would be
replaced with d. Have the user input a one-line message and a value for x. Then display
the encrypted message, using Caesar's code. The following alphabet has been rewritten
on the basis that x = 5.
abcdefghijkimnopqrstuvwxyz
efghijkimnopqrstuvwxyzabcd
Research encrypting techniques and design an encrypting program that would allow
different coding and decoding techniques in one program.
The best computer is your mind
RFHallCSS
Computer Studies
5. Utilities combo: time zones (date and time), advanced key-press calculator, stop watch
with several time-recording possibilities, electronic agenda book with an audio and visual
reminder of an appointment (date and time activated)
6. Write a program to simulate an extrasensory perception (ESP) test. Use subroutines
to create a series of patterns. Common patterns used are crosses, circles, stars, parallel
lines, and squares. Have the computer randomly select a pattern but not display it. Ask
the user to guess which pattern has been selected. Display the pattern in the centre of the
screen and indicate whether the guess was correct. Count the number of right and wrong
guesses. Give the current score as a percentage and display it with the percentage
expected as a result of guessing on the top line on the screen. The program should record
and store the average of previous guesses in a separate file and compare the player’s
average to that of the previous players.
7. Advanced educational and interactive game based on story telling (include word
guessing, spelling practice, synonyms, crosswords, word searches, quizzes). The game
may include players and summary of the results. Time restraint may be placed on the
player to perform an action.
8. In the game of spies there are four spies hiding on a ten by ten grid (0 to 9, x and y
axes). The object of the game is to find the spies by guessing their locations on the grid.
After each attempt the program will print the distance from the guess to each of the spies.
The distance can be found by using Pythagoras’ theorem with the two points (a spy and
the guess). As well as printing the distances, show (on the grid) the position of each
guess and the location of each spy when found. Do not erase the grid or screen after each
turn. The following is ONLY an example. Your solution should be more insightful and
developed:
9-----------8-----------7-----------6-----------5-----------4 - - *- - - - - - - - 3 - - - - -S - - - - - 2----------*1-----------0-----------0123456789
9. Drawing and colouring book. The program should include line and closed objects
drawing. A menu gives the user a selection of drawing techniques (line, closed objects,
dots) after the selection, the next screen should allow to choose from another menu
(mouse-based drawing, co-ordinates-based drawing). Once the drawing techniques have
been selected, allow for the choice of fill and/or object colour.
The best computer is your mind
RFHallCSS
Computer Studies
10. Science students consult the periodic table for many reasons. Write a program that
loads the periodic table into an array. When the user enters either the element name (e.g.,
Argon) or its symbol (e.g., Ar), the program should display all related information for
that element, including the family (e.g., rare gas) to which the element belongs. If the
user enters a family name, the program should print a list of all of the members of that
family. Include other
11. This problem requires that you know the theory behind matrix mathematics.
Mathematics uses arrays and tables for many things. In this problem a series of
procedures is used to do some fundamental matrix operations. Each should be accessed
from a menu.
a) Allow the user to enter the number of matrices to be used (up to two) and the sizes of
the matrices. Create the matrix and load the arrays as:
desired by user input;
as an identity matrix (entries are 1 only if the row and column number are equal;
otherwise they are 0);
as a zero matrix (all entries are 0);
as a unit matrix (all entries are 1).
b) Print the matrix (both of them if there are two).
c) Add the matrices if there are two.
d) Subtract the matrices if there are two.
e) Multiply the matrices if there are two.
f) Allow the user to enter a series of operations on a matrix (e.g., multiply a row or
column by a value, add a row to or subtract a row from a row, or a column to or from a
column).
g) Transpose one matrix (the rows of the original matrix become the columns of the
transposed matrix). This will require dimensioning a new matrix.
12. Hurkle is a simple game played on a ten by ten grid (0 to 9 on the x axis and 0 to 9
on the y axis). The Hurkle (a mythical furry animal loved by all) is hidden somewhere on
the grid by selecting two random numbers, each in the range 0 to 9. The player then tries
to guess the Hurkle’s hiding place by entering two values (x and y). The program
responds by giving directions as to where to find the Hurkle. The game is over when the
Hurkle is found. The following is a sample game:
HURKLE – Find the Hurkle hiding on the grid
- - -
9 - - - - - - 8 - - - - - - - - -
What is your guess (x, y)? 3, 2
- - Go right!
-
7 - - - - - - 6 - - - - - - - - -
The best computer is your mind
RFHallCSS
Computer Studies
Go up!
-
5 - - - - - - - - 4 - - - - - x - * -
What is your guess (x, y)? 5, 4
- - Go right!
-
3 - - - - - - 2 - - - x - - -
- -
1 - - - - - - - - What is your guess (x, y)? 7, 4
- - -
0 - - - - - - 0 1 2 3 4 5 6 7 8
9
You have found the Hurkle in 3 tries.
13. Create a word search puzzle, using an array and data entered from the keyboard or
stored in DATA statements. Randomly select a row-and-column position in the array as
the starting location for placing the next word. Check that there are enough free spaces in
the table to place the word. If not, select a new starting position. When all the words are
placed, fill the remaining spaces with random letters. The following are sample words
for a video puzzle: asteroids, battle, zone, berserk, breakout, defender, eagle, missile,
command moon, phoenix, pleiades, red baron, scramble, space invaders.
14. Create a text analyzer.
a) When the user has entered a number of lines of text, your program should count the
number of sentences, the number of words, and the number of syllables in the text. To
count syllables, you must count vowels; each time a vowel (including y) is found,
increment the counter. Note that vowels must be separated by consonants; thus abe
counts as 2; aeb counts as 1. Each word must be at least one syllable. If the last
character is an e, then decrement the counter.
b) Your program should also find the average word length.
15. Write a program to play the following game. This game uses either the numbers
from 1 to 15 or the letters A to P in a four-row, four-column array. Thus, one square is
left empty. Any adjacent piece can be moved into the empty square. The program
should do three things:
a) After creating and loading the puzzle it should shuffle the contents according to the
rule that any letter can move into the adjacent empty square.
b) It should then let the user move the letters according to the same rule.
c) Finally, it should count the number of moves made and tell the user when the puzzle is
in the correct order.
The best computer is your mind
RFHallCSS
Computer Studies
16. In the early 1970s British mathematician John Conway conceived and developed the
Game of Life. His game simulates the growth of a population with strict rules:
If a cell is surrounded by exactly three live neighbours, then that cell is born.
A being (or cell) stays alive as long as it has two or three neighbours. If it has less than
two, it dies of loneliness; if it has more than three, it dies from overpopulation.
Every generation of births and deaths occurs simultaneously.
Create a program that plays the Game of Life. The user should be able to create an initial
population. For each generation, the program should examine the current occupancy of
each cell, check the numbers of its neighbours, and adjust the population the next cycle.
It should print the population after each generation.
Figures 1 and 2 are two sample displays of populations across three generations. The
hyphen (-) indicates an empty cell; o is a live cell.
Figure 1
First
Generation
Second
Generation
Third
Generation
---o-----o-----o---
--------ooo--------
---o-----o-----o---
First
Generation
Second
Generation
Third
Generation
-oo-----oo-----ooo----oooo----------
-oo----o------o---o---o--o----oo----
-o----o-----oo-----oo–o---oo---
Figure 2
17. Write the following game for two players. Create a five by five matrix. Load the
matrix with random values from –10 to +10. Print the matrix on the screen. The first
player enters a row number, and the second player a column number. The first player
receives the number of dollars in that cell. This is then repeated with the second player
choosing the row, the first player choosing the column, and the second player getting the
money. The game continues for ten turns; the winner is the player with the most money.
be sure to have the computer ask for the players’ names and show the results after each
turn. Have the computer announce the winner. To make this more challenging problem,
have the computer as the second player.
The best computer is your mind
RFHallCSS
Computer Studies
18. A number of faculty members at St. Francis Xavier have requested an interactive
grading program that would be used at a terminal to determine grades for their classes.
The faculty members would like to be able to enter each student’s name and exam score
and have the program calculate the class average. Using that class average as a guide, the
faculty member would then specify the minimum exam score for grades of A, B, and C.
The program would then display the distribution of those grades (i.e., the number of As,
Bs, and Cs).
The faculty member could continue to try new minimum scores for grades of A, B, and C
until the grade distribution is satisfactory. At this point the program would list each
student’s name, exam score, and final letter grade. The maximum class size is 100.
19. It is often valuable for children to practice their arithmetic by completing a series of
problems. Write a program that will let a child enter the number of questions to be asked
and the values for the highest and lowest numbers to be used. Load the first two columns
of a table with the numbers in the specified range. Load the third column with the correct
answers. Print each question (with the appropriate operator: +, -. x, or /) on the screen
and record the child’s answer in the fourth column of the table. When all questions have
been answered, print those questions answered incorrectly, showing the child’s answer
and the correct answer. Give the number that have been answered correctly as a
percentage score.
************************************************************************
*********************
20. Encryption involves putting text into a coded form so that others cannot read it.
Write a program to implement the following simple encryption program. Create a list
and load the list with the numbers from 1 to 26. Shuffle or scramble the list (see question
24). Now allow the user to enter the message. Encode the message by looking up the
cell matching each letter (a is cell 1, b is cell 2, and so on) and by printing the number
found in the cell.
Encrypted text is rather useless unless it can be decrypted. Complete your program by
taking each number in the encrypted message and converting it back to the original letter.
21. In one popular game a player must remember a series of words. One word is given,
and the player types it in. Then another word is given, and the player enters the first and
the second word. A third word is displayed on the screen, and the player now enters the
first, second, and third words. The game continues until the player makes a mistake.
Write the program for this game. The words should be read from data and loaded into a
list. A word is then randomly chosen and displayed on the screen for a few seconds, after
which the screen is erased. The word is stored in a second list. The user enters words
one at a time, and the program checks the entries against the second list. Loop until an
error is made. What is your best score? Create a third list to keep track of players and
their best scores.
The best computer is your mind
RFHallCSS
Computer Studies
22. Here is another game. Read a word from data and, using string functions, put each
letter of the string into a different cell of a list. Now shuffle the list by randomly picking
two subscripts and interchanging their contents. Shuffle the list twenty or thirty times.
Display the contents of the list in shuffled order and have the player try to guess the
correct word. Keep track of the player’s name and the numbers of guesses in a second
list.
23. Create and mark a true-false test on the computer. Use at least 25 questions. Store
the answers in a list and mark the test after all questions have been asked and answered.
Give the user a question-by-question feedback. Display the final score as a percentage.
A modification to this program could have the questions asked randomly.
24. The Julian date is a number associated with each day of the year. It is based on the
day’s numeric position in the year. The Julian date for January 1 is 1, for January 15 is
15, for February 10 is 41 (31 days in January plus 10) for December 31 is 365 (or 366 in
leap year). Create a program that will accept a date (day, month, year) and print the
Julian date. Be sure that your program works for leap years.
25. Set up a “dictionary” of words. Have the user input a sentence and check each word
in the sentence against the dictionary. If a word is not found, then a statement to that
effect should be displayed, and the user should be allowed to add that word to the list, to
change the word, or to ignore it and move on to the next word.
26. Write a simple word processing program. Create a menu to let the user:
a) enter text into an array;
b) see any line of text in the array;
c) change any line by entering it again;
d) copy any line to any other line in the array;
e) blank out any line in the array;
f) search for any word in the unsorted and sorted array.
26. A mix-match puzzle consists of a list of words and a matching list of phrases. For
example:
Churchill
Roosevelt
Eisenhower
Rommel
war prime minister
war president
American general
field marshal
The two lists are scrambled or shuffled, and the user is asked to match items from the
first list with those on the second. Write a program to load two lists from data and create
a mix-matched puzzle. (This program can be extended by having the user enter matches,
which are then scored.) A list can be scrambled by randomly picking two subscripts and
interchanging or swapping their values in the list.
The best computer is your mind
RFHallCSS
Computer Studies
27. Make up two lists, one containing words you have trouble spelling and another
containing their meanings. Randomly pick the definitions from the list and try to spell
the word correctly (“Spell the word meaning end.”) When the word is correctly spelled,
replace the definition with an asterisk (*). Loop the program until you have spelled all
your problem words correctly. This program is also very good for practising your
language homework (e.g., translate moins), your geography, and many other subjects.
28. Hooked on Phonics exercise book for pre-schoolers.
29. A hangman game (utilise graphics and string manipulation).
30. Your own Lottery combo with prize distribution based on the number of tickets sold
and the money collected from the sales of tickets. Lotto 6/49, Super 7, Pick 3, Sports
Lotto, etc.
31. A card game.
32. A domino game.
33. A mine sweeper game.
34. A battle of ships game.
35. A trivia game.
NOT FINISHED
32. Create a multiple-choice-test correction program. The correct answers are READ
from DATA. Each person’s name and answers should also be read from data
The best computer is your mind
RFHallCSS
Computer Studies
Assessment Checklists/Marking Schemes/Rubrics
Problem Definition Report
Assessment – Communication
Due: Wednesday, May 28th
Describe the applet that you are going to write from the user’s point of view. Describe in
detail all the features of the program that will be experienced by the user. Write it in third
person, “The user will” . Remember to cover all aspects of the program. You may use a
screen capture as part of you submission.
Item
Would an informed user buying your computer game understand
what it is about?
Is the definition easy to understand?
Is the writing free of grammar and spelling errors?
Level
Level
Level
Level
R
4
3
2
1
R
4 – A great deal of success
3 – Considerable success
2 – Some success
1 – Little success
- Missing
Analysis Report
Assessment – Thinking Inquiry
Due: Thursday, May 29th
You are not being given the choice of language or medium for your project. In this section
you will list programming considerations that you have identified once your Problem
Definition is complete. These are details that you identify by analyzing your Problem
Definition Report.
Item
Are the programming considerations complete?
Level
Level
Level
Level
R
4
3
4 – A great deal of success, identifies all programming consideration
3 – Considerable success, identifies most programming considerations
2 – Some success, identifies some of the programming considerations
1 – Little success, identifies few programming considerations
- Missing
The best computer is your mind
2
1
R
RFHallCSS
Computer Studies
Sample Submission – Journey with the Jaguars
Problem Definition Report
Submitted by:
Journey with the Jaguars is a two-dimensional applet game. The object of the game is to
cross the game board from bottom to top while always keeping a positive total of life points.
The possible values of each square are indicated by six colours. The points values assigned
to the colours are as
follows:
Colour
< - 14
-15 to -6
-5 to -1
0 to 4
5 to 9
>9
Points
Red
Pink
Yellow
Cyan
Blue
Green
The user begins with 0 life
points.
The user begins the game by
clicking on a cyan, blue or
green square in the bottom
right. The user must then
click left, right, above or below on subsequent moves but each square may only be clicked
upon once. If the life points fall below 0 at any time, the game is over and the user loses
the game. The start button will allow the user to start a new game and the program will
keep a high score count for one applet session.
Analysis Report
The program must provide a means of:







generating random numbers and converting the numbers to colours;
restricting the first click to the bottom row;
restricting a click to being left, right, above or below the previous square
keeping an ongoing life points total
ending the game if life points go below 0
allowing the user to click just once on each square
keeping the high score
The best computer is your mind
RFHallCSS
Computer Studies
Design
ForestHectare Class
Constructor
set visit to false
set life points
set colour
setLifePoints()
generate a number from 0 to 39 and subtract 25
setColour()
use the chart to determine the colour based upon the life points
ForestApplet class
rowColDisplay (int r, int c)
convert row son that user sees bottom row as row 1
display row and column on-screen
stopAccess ()
visit each square and set visit to true
validFH (int row, int col, int oldRow, int oldCol)
if new square is in same row and column one apart
return true
else if new square is in the same coulm and row is one apart
return true
otherwise return false
The best computer is your mind
RFHallCSS
Computer Studies
ForestApplet Class
actionPerformed()
if new game button pressed
reset points
reset first click
else
loop through buttons looking for clicked button
if first click
if click on bottom row
get points from square
update points
update location
set first click to false
mark square as visited
else
display error message
else
if valid square clicked
if square has not been visited
get points from square
update points
update location
mark square as visited
if game won
display message
set all squares to visited
if points greater than high score
record new high score
display new high score
else
display visited message
else
display invalid square message
if points less than zero
display losing message
The best computer is your mind
Download