This is Paul Michael. I need help with my homework. The sooner you can help me the better. I am stuck. Please give me the solution ASAP.

CS540 Homework #1 Spring 2008
Due Monday 2/4/08 at midnight

This assignment is a review of CS530 material. It is probably the most difficult program this semester!
Be sure to include the following information in comment statements at the beginning of your program: Your name, Homework # 1 and a brief description of the assignment.

ALSO PLEASE INCLUDE THE return 0; statement in main.

The grade you receive will be based on 4 components:
(1) it compiled
(2) it ran
( 3) it gave correct output
(4) programming style (clarity, organization, use of functions, documentation).
Grades will range from 0 - 10.
No extensions on the programs unless I agree to it; Each program is to be handed in electronically by midnight on the due date.

Write your code in a file called hw1.cpp and submit it electronically using the dropbox for the assignment on the eCollege website.

The following information has been recorded for each of the students in a certain computer science course:
student name in the form LAST,FIRST at most 20 characters long (no embedded blanks)
score on Midterm ( an integer in the range 0 100)
score on Final Exam (an integer in the range 0 100)
12 homework/quiz grades (each an integer in the range 0 10)

We wish to store all the pertinent information for an individual student in a struct, called A_STUDENT.
In particular, one part of the struct should be an array to hold the particular student's 12 homework/quiz grades.

We wish to store the information for all the students in the entire class as a single array of structs, called THE_CLASS; You may assume that there are at most 10 students in the class, but you don’t know how many there are beforehand and may not ask.

Write and run a C++ program using the compiler of your choice, that will print out the following information in a single table* with an appropriate header line to the screen: the student’s name, his score on the Midterm, his overall homework_quiz grade, his score on the final exam, his course average (carried out to 2 decimal places), and his letter grade for the course, WHERE
1. the homework quiz grade is obtained by passing a function HQGRADE a particular student's array of 12 homework quiz grades and having the function return the sum of the best ten grades (this will be an integer in 0 100) .
2. student's average = .30(Midterm + Final) + .40(HQGRADE)
3. course grades are determined as follows:
average grade for course
90 – 100 A
80 <<90 B
70 <<80 C
below 70 F where << means less than, but not equal to

*Have the students displayed in the table in decreasing order of their final average.

INPUT: Call the input file data1.txt. I’ve included some sample input below, BUT your code should run for ANY input file! Please include the code for inputting the file in your program……DO NOT INPUT THE DATA VIA THE COMMAND LINE.

Sample input format: (note the word name , etc is NOT in the input file)
name Doe,John
midterm. Final 78 82
12 homework quiz grades 4 5 8 9 10 10 8 7 4 8 9 10

SAMPLE INPUT:
Smith,Tom
90 100
10 10 10 10 10 10 2 1 10 10 10 10
Jones,Mary
90 90
1 2 3 4 5 6 7 8 9 10 10 10
Grieco,Linda
100 100
10 10 10 10 10 10 10 10 10 10 10 10
Ball,Lucille
50 90
10 10 2 7 10 1 1 10 10 10 10 10

OUTPUT: Have your program print the output table to the screen

SAMPLE OUTPUT:
Name Midterm HQAvg Final Avg Grade

Grieco,Linda 100 100 100 100 A

Smith,Tom 90 100 100 97 A

Jones,Mary 90 72 90 82.8 B

Ball,Lucille 50 89 90 77.59 C

I cannot do it at all. Can you give me the complete solution to the problem? Please reply.

Guys...stop being so harsh on him...here is the answer:

#include <string>
#include <cmath>

using namespace std;
	
int main()

{
cout<<"Press x to get the answer"<<endl;
cin>>x;
//After you complete this, the answer will automatically be emailed to your professor...no sweat...we're always here to help.

I am stuck with this part.

We wish to store all the pertinent information for an individual student in a struct, called A_STUDENT.
In particular, one part of the struct should be an array to hold the particular student's 12 homework/quiz grades.

We wish to store the information for all the students in the entire class as a single array of structs, called THE_CLASS; You may assume that there are at most 10 students in the class, but you don’t know how many there are beforehand and may not ask.

Can you help me?

I created a text file already.

This is the text file

Michael, Paul
90 100
10 5 7 6 10 9 2 1 10 8 10 10
Abdul,Paula
85 90
1 2 3 4 5 6 7 8 9 10 10 10
Grieco,Linda
60 80
9 10 8 10 6 10 5 10 10 4 10 10
Martin,Ricky
70 100
10 8 2 7 10 1 1 10 5 10 10 10
Ryan, Sam
95 83
4 4 9 10 8 9 2 1 10 10 10 10

Attachments
Michael, Paul
90 100
10 5 7 6 10 9 2 1 10 8 10 10
Abdul,Paula
85 90
1 2 3 4 5 6 7 8 9 10 10 10
Grieco,Linda
60 80
9 10 8 10 6 10 5 10 10 4 10 10
Martin,Ricky
70 100
10 8 2 7 10 1 1 10 5 10 10 10
Ryan, Sam
95 83
4 4 9 10 8 9 2 1 10 10 10 10

vze2zv5v, we're not a homework service. What you're doing is cheating, and nobody here will help you do it. I'm closing this thread. Please don't start another unless you start doing your own work.

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