Thread: infile,outfile,struct

  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    1

    Unhappy infile,outfile,struct

    HELP PROGRAMMERS!!!
    I’m struggling with this problem, can anyone help with me code this one in C++? So I’m calling the attention of the next Steve Jobs or Bill Gates, it could be you! I’m a computer enthusiast but a beginner and lacks knowledge in C++ programming. I terribly need it before March 18,2013, Monday(Philippine time). Please reply me to my email address: <<<email snipped - this is a forum, not a dating site>>>

    Project Name: Student Scores
    Source file name: studentscores.cpp
    Input file name: scores.in
    Output file name: scores.out

    Write a program that reads student’s names (lastname, firstname) followed by their test scores. The program should output each student’s name followed by their test scores and the relevant grade. It should also find and print the highest test score and the name of the students having the highest score.
    Student data should be stored be stored in a struct variable of type studentType, which has four components: studentFName and studentLName of type string, testScore of type int (testScore is between 0 and 100), and grade of type char. Use the A-F grading scheme. Suppose that the class has 20 students, use an array of 20 components of type studentType.
    Your program must contain at least the following functions:
    a. A function to read the student’s data into the array.
    b. A function to assign the relevant grade to each student.
    c. A function to find the highest test score.
    d. A function to print the names of the students having the highest test score.
    Your program must output each student’s name in this form: last name followed by a comma, followed by the first name. Moreover, other than declaring the variables and opening the input and output files, the function main should only be a collection of function calls.
    Last edited by Deo3; 03-16-2013 at 02:25 AM.

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    If you don't want to learn and do the homework, you shouldn't be in the class.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    At least they offered code on their cross-post. Too bad they couldn't offer the same courtesy here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2 outfile questions
    By monki000 in forum C++ Programming
    Replies: 2
    Last Post: 04-26-2010, 10:45 PM
  2. outfile problem
    By syrup890 in forum C++ Programming
    Replies: 5
    Last Post: 12-07-2008, 10:59 PM
  3. Outfile problem
    By Mrandrade in forum C++ Programming
    Replies: 0
    Last Post: 04-10-2005, 12:41 PM
  4. infile from the web
    By major_small in forum C++ Programming
    Replies: 2
    Last Post: 05-25-2003, 01:23 AM
  5. Is there a way to sort or search an outfile?
    By Golffor1 in forum C++ Programming
    Replies: 3
    Last Post: 04-24-2003, 11:15 AM

Tags for this Thread