Module 2 - Game Skills 4
Assignment 2.09


Objectives: After studying the Module 2 Game Skills 4, you will be able to:

  1. Use the 5 step process to design a computer program.
  2. Use a flowchart to design an algorithm to handle a computer task.
  3. Use numeric and alphanumeric variables to store data, process data, and print out data.
  4. Format output data in an organized table using print zones.

YOUR LESSON

Introduction

The assignments in this module have given you practice with using the 5 step process to design computer programs. A key ingredient of the process is the development of an algorithm. And an important tool for developing algorithms is the flowchart. Usually, if you can visualize the algorithm with a flowchart, coding the program will be fairly easy.

You have also learned about assigning information to variables. There are basically two different types of information that can be assigned: numeric and alphanumeric. Numbers are assigned to numeric variables and text, symbols, or words (anything that will not be used to do arithmetic) are assigned to alphanumeric variables. Sets of information can be processed by assigning data to unique variables.

Finally, you have seen different ways to format output. Data can be printed as variables in combination with literals or it can be neatly organized in the columns of a table. If a table is used, preset print zones can be used by placing a comma between items in a PRINT statement.

Remember, "good programming practice" means using REMs to tell the name of the program, the name of the programmer, and the date. After all, wouldn't you put the name of the assignment, your name, and the date on work you turned in for another class? It is also helpful to break up programs into blocks of code that do specific tasks--for example, Input, Processing, and Output. This is somewhat analogous to creating an outline which has well defined sections and follows a structured pattern. Finally, the use of meaningful variable names makes it easier to understand what a program is supposed to do.

It's now time to put all this into practice with one final program for Module 2.


YOUR ASSIGNMENT

The coed 3-player basketball team needs to keep track of some simple statistics. Your job as the team statistician is to write a program that will neatly display the team's scoring information in a table format. Here are the details you will need to write this program.

  1. The title above the table should be The Binary Bandits.
  2. There should be column headings for Player, 2-Pts., 3-Pts, FTs, and Total.
  3. There should be three rows of data, one for each player.
  4. All alphanumeric and numeric data must be assigned to variables.
  5. Use several colors to enhance the appearance of the table.
  6. The actual data you will use represent the number of 2 point baskets made, the number of 3 point baskets made, and the number of free throws made. These statistics for each player are shown in the table below.
  7. From this you will calculate the total number of points made by each player. The general formula to use for total points is:
    • Total = (No. of 3-Pointers x 3) + (No. of 2-Pointers x 2) + Free Throws
  8. The final output should resemble the table shown below.
  9. Create a flowchart showing your algorithm and save the file as bandits (the extension will vary depending on which program you use to create the flowchart.
  10. Save the program as BANDITS.BAS.
  11. Submit the two files as one zipped file for Assignment 02.09.
  12. (If you created an additional file for the flow chart, attach it along with the one for the BANDITS.BAS but please do not zip them together)

   
Binary Bandits
 
  Player 3-Pts 2-Pts FT Total
  Atwill 2 6 5 23
  Putney 5 3 4 25
  Jordan 2 4 3 17

Grading Rubric

All assignments will be graded according to a rubric. For Assignment 02.09 - Game Skills 4, the rubric will be as follows:

Required statements used: 2 out of 2 points
Flowchart used: 2 out of 2 points
Required material included: 2 out of 2 points
Program ran properly: 2 out of 2 points
Proper output: 2 out of 2 points

This assignment is worth a total of 10 points. If you are dissatisfied with your grade, you may redo and resubmit the assignment. You will need to zip the two files (the program and the algorithm) and submit them as an attachment.


A QBasic Review

Before moving on to the next assignment, be sure that you can do the following:

  1. Use the 5 step process to design a computer program.
  2. Use a flowchart to design an algorithm to handle a computer task.
  3. Use numeric and alphanumeric variables to store data, process data, and print out data.
  4. Format output data in an organized table using print zones.

At this point, you should have a good grasp of the basic programming process, the use of variables, and printing data in tables.


Attach the program you wrote for this section to Assignment 02.09 Game Skill 4 in the Dropbox area. Once you have completed the assignment, please move on to the next assignment.

previousnext