Thread: Grade distribution program

  1. #1
    Registered User
    Join Date
    Mar 2003

    Angry Grade distribution program

    I have a program due friday and Im totally lost on it. im taking c++ in high school and no the bare minimum about it. anyways my teacher wants us to use text files along w/functions to show on a bar graph the different grades of 3 different classes. like for example the output should look something like this:

    5 6 7 8 9 10
    math A: ****
    B: *********
    C: *******
    englishA: ****
    B: ****************

    you know something similar to that nature. the actual directions on the paper say:

    output: print a histograph showing grade distribution in 3 different classes.

    syntax: Implementing functions and file streams

    assignment: you program should correctly print out a histograph representing grade distribution in 3 different classes. organize your program into blocks, add comments for easy reading.

    50% of the grade is if your program complies, uses at least one function, and is well commented.

    if you could give me any help i would GREATLY appreciate it!

  2. #2
    Registered User
    Join Date
    Nov 2002
    some stuff for you to ponder upon, but you'll need to try it, then we'll help you from there.

    i'm not sure how the text file is layed out if you are given one, or if you have to make one up.

    read in the grades into possibly arrays
    - how many are As, Bs, etc. // counter(s)
    use if statements to count the numbers
    print number of grades with stars or of your choice

  3. #3
    Registered User
    Join Date
    Mar 2003
    i have to make up the text file myself by making up random grades and for every A there is in a class the printer is suppose to print out a star and so on... sorry i knew i forgot to include something

  4. #4
    Registered User
    Join Date
    Apr 2002
    Give it an honest effort if you haven't already. Then post your code here and we can try to help you. Is there a specific aspect of the program that eludes you? Do you need help designing it?

  5. #5
    The Pantless Man CheesyMoo's Avatar
    Join Date
    Jan 2003
    You need to include <fstream> to read and write to files.

    To make sure the basic program works, just display it on the screen, then once that works write it to a file.
    If you ever need a hug, just ask.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C program using structs to calculate grades
    By TampaTrinDM88 in forum C Programming
    Replies: 4
    Last Post: 07-06-2009, 12:33 PM
  2. insufficient memory for tsr
    By manmohan in forum C Programming
    Replies: 8
    Last Post: 01-02-2004, 09:48 AM
  3. program from book wont work
    By cemock in forum C Programming
    Replies: 2
    Last Post: 03-06-2003, 09:58 AM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM