Ask Experts Questions for FREE Help !
Ask
    Simonne's Avatar
    Simonne Posts: 7, Reputation: 1
    New Member
     
    #1

    Nov 10, 2009, 09:17 AM
    qbasic programming player's stats
    Generate a report using the provided data file. The file contains hitting statistics for baseball players from a few seasons ago. The report will consist of batters' name, total times at bat, total hits, and final batting average. Computations are as follows:
    1. total at bats = plate appearances - walks
    2. total hits = singles+doubles+triples+home runs
    3. batting average = total hits/total at bats

    Input data file Information:

    INPUT FILE DESCRIPTION File name: Stats.txt
    FIELD DESCRIPTION DATA TYPE DECIMALS
    Name Character 0
    Plate Appearances Numeric 0
    Runs Numeric 0
    Singles Numeric 0
    Doubles Numeric 0
    Triples Numeric 0
    Home Runs Numeric 0
    RBIs Numeric 0
    Stolen Bases Numeric 0
    Walks Numeric 0


    Note: The first record in the input file contains field names.





    the data file has a list of players with their stats. If someone could just help me understand what I am suppose to do that would be extremely helpful :)
    thank you
    Simonne's Avatar
    Simonne Posts: 7, Reputation: 1
    New Member
     
    #2

    Nov 10, 2009, 09:25 AM

    Here are just some of the players I need to use



    Name,Plate Appearances,Runs,Singles,Doubles,Triples,Home Runs,RBIs,Stolen Bases,Walks
    A. Pujols,670,137,117,51,1,43,124,5,79
    T. Helton,694,135,122,49,5,33,117,0,111
    B. Bonds,538,111,65,22,1,45,90,7,148
    E. Renteria,652,96,133,47,1,13,100,34,65
    G. Sheffield,662,126,112,37,2,39,132,18,86
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #3

    Nov 10, 2009, 10:11 AM

    The input information usually would come from a data file. Write the data into a file. Open that file and read it. Use commas to separate the fields. Put the data from each of the fields into array variables or an array of a structure (there are at least a hundred ways to do this). Once you do that, simply create a subroutine to write the data to the report. The data will come from the array variables.
    rmthomas20's Avatar
    rmthomas20 Posts: 1, Reputation: 1
    New Member
     
    #4

    Nov 12, 2009, 08:36 AM
    A variable that is variable to every module in the program is a _______.
    retsoksirhc's Avatar
    retsoksirhc Posts: 912, Reputation: 71
    Senior Member
     
    #5

    Nov 12, 2009, 09:40 AM
    Quote Originally Posted by rmthomas20 View Post
    A variable that is variable to every module in the program is a _______.
    It's called a "click this link: https://www.askmehelpdesk.com/financ...-b-u-font.html "
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #6

    Nov 12, 2009, 11:43 AM
    Quote Originally Posted by rmthomas20 View Post
    A variable that is variable to every module in the program is a _______.
    Try "Global Variable"

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Qbasic programing [ 4 Answers ]

Please help me I have no idea how to program this thing! Develop a program using loops that displays rows of asterisks in two different ways: 1. Ascending then Descending * ** *** ****

Player's Choice [ 6 Answers ]

Do they still make Player's Choice cigarettes? I need them for a play prop.

QBASIC programming [ 1 Answers ]

Tell me how to do programming in qbasic

Running QBasic in Suse 10 (Linux) [ 11 Answers ]

Background: I have this QBasic program, consisting of these 3 files (QBASIC.EXE, QBASIC.HLP, QBASIC.INI), and it’s currently running on Windows XP SP2 OS. I plan to switch an entire lab to SUSE 10 Linux OS. I have a beginning programming class (senior high) that’s learning this old language. ...


View more questions Search