C++ Write a program

TWO (2) groups of students at a private college university are enrolled in certain special courses during the special semester. The courses are taught by different lecturers. At the end of the semester, both groups are given the same tests for the same courses, and their scores are recorded in separate files. The data in each file is in the following form:
courseId1 score1, score2, ….., scoreN -999
courseId2 score1, score2, ….., scoreN -999
.
.
.
e.g. input file:
Input data for group1
CSC 80 90 70 83 75 -999
ENL 70 85 67 63 55 -999
.
.
.
You need to prepare two separate input files, one for each group. Name your input file as group1.txt and group2.txt. -999 indicate the end of record for the test mark. It should not be counted into the average mark.
You are then required to write a program that finds the average course score for each course for each group. The example output is of the following form:
Course Id Group No Course Average
CSC 1 79.60
2 74.45
ENL 1 68.00
2 69.42
.
.
.
Average for group 1: 82.04
Average for group 2: 81.32

I have no idea how to do this c++ program can anyone help me thanks

Alot will depend on how much c++ you already know. Do you know about classes and <vector> yet?

Start out by generating the two required text files. Then write a very simple program that opens and reads them.

Don't get overwhelmed by the complexity of the program. Code, compile and test just small parts at a time.

Will I write the program for you? I could, but I won't.

wht u meant by u could but u wont? hmmmm it is ok anyway thanks.....

pls help me guys....to solve this program....

*****C++ Program*****

TWO (2) groups of students at a private college university are enrolled in certain special courses during the special semester. The courses are taught by different lecturers. At the end of the semester, both groups are given the same tests for the same courses, and their scores are recorded in separate files. The data in each file is in the following form:
courseId1 score1, score2, ….., scoreN -999
courseId2 score1, score2, ….., scoreN -999
.
.
.
e.g. input file:
Input data for group1
CSC 80 90 70 83 75 -999
ENL 70 85 67 63 55 -999
.
.
.
You need to prepare two separate input files, one for each group. Name your input file as group1.txt and group2.txt. -999 indicate the end of record for the test mark. It should not be counted into the average mark.
You are then required to write a program that finds the average course score for each course for each group. The example output is of the following form:
Course Id Group No Course Average
CSC 1 79.60
2 74.45
ENL 1 68.00
2 69.42
.
.
.
Average for group 1: 82.04
Average for group 2: 81.32
Do include appropriate error checking and messages in your program, e.g. comparing Course Id before calculating average etc.

[boilerplate_help_info]
Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it you missed:

  1. Ask a question that can be answered. Do not ask
    -What's wrong with my code?
    -Why doesn't this work?
    -Anything else that does not give us useful information.
  2. Post your code. If we don't know what you did, how can we possibly help?
    -Use PROPER FORMATTING -- see this
    -Use CODE Tags so your formatting is preserved.
    If we can't follow your code, it's difficult to help. We don't care that you're still working on it. If you want us to read it, it must be readable.
  3. Explain what the code is supposed to do. If we don't know where the target is, how can we help you hit it?
  4. Explain what actually happened! If we don't know where the arrow went when you shot it, how can we tell what went wrong and how far from the target you are?
  5. If you have errors, post them! We can't see your screen. We can't read your mind. You need to tell us what happened.
  6. Do not ask for code. We are not a coding service. We will help you fix your code.
    -If anyone posts working code for you, they are a cheater.
    -If you use that code you are a cheater.
  7. Do not bore us with how new you are. We can tell by your code.
    -Do not apologize. We were all new, and unless you are completely brain dead you will get better.
    -Do not ask us to "take it easy on you."
    -Do not say "I don't know what's going on." That's obvious since you posted for help. Use that time wisely by explaining as best you can so we can help.
  8. Do not apologize for posting 'late'. We don't have any expectations on when you should be posting - 10 minutes or 10 days. We aren't timing your responses.
  9. Do not post your requirements and nothing else. We view that as a lazy do-nothing student that wants us to do their work for them. That's cheating and we will be hard on you.
  10. Do not attach files except when absolutely necessary. Most of us are not going to download files. Add the information to your post.
  11. Do not tell us how urgent it is. Seriously, for us there is no urgency at all. Many that can help will ignore any URGENT or ASAP requests.
  12. Create a good title for your post. The title C++ in the C++ forum is bloody redundant and worthless! What's wrong? equally so. Specifically what are you having trouble with? There is your title. (note: my program is not the answer.)

Think more about your next post so we don't have to play 20 questions to get the info we need to help you.
[/boilerplate_help_info]

hey!!!!! wht the hell n then wht's point having this web site.....and for ur information i am not lazy....i just asking help!!!!! abt how to start my assingment is that wrong!!!!!!and pls try to be polite to other dont be rude to other "WaltP" or whtever ur name is .................anyway have a good day!!!damn

Edited 4 Years Ago by alanso

This article has been dead for over six months. Start a new discussion instead.