Test Data

I got a program about GPA calculator. I need to come up with 5 sets of test data. How shall I do it. I know it must be in table form which includes int input, process and output. But can anyone tell me what does the table must consists of.
What about 5 different grades? ABCDF ?
dude what you mean by 5 different grades. we need to input their course name, mark obtained, and credit hour. Shall I calculate the GPA for every one subject. And repeat the process for all 5 ?
I mean. Ive looked around at some GPA calculator sites. They require you to input just like you said, course name, credit hour and the grade that you got. Then it calculates stuff. So I dont really understand what you mean by
5 sets of test data.
Last edited on
I also don't understand bro. they asking for 5 test data. how am i suppose to do it.

shal i do like this:

subject name
credit hour
mark
for 5 times

or
{
subject 1:
subject name
credit hour
mark
subject 2:
subject name
credit hour
mark
subject 3:
subject name
credit hour
mark
subject 4:
subject name
credit hour
mark
subject 5:
subject name
credit hour
mark
}
for 5 times
Aha okay now I think I get it. They're basically asking you to do it for 5 different people. So you would need a for-loop that runs 5 times.

Have you gone through loops in your class, or arrays? Tell me what you can and cant use and I'll lead you in the right direction.

Edit: After reading it again. They want you to do it on one person, but 5 different subjects. So for example math, English, Programming, History and P.E. They want you to enter each of those as the subject name, then the credit hour, and the mark that you got.
Last edited on
I've used functions, arrays, for loops, if else statement in my program. since they ask me to use all of it to run the program. my program is about GPA calculator for 5 subjects such as programming, chemistry, physics, calculus and english.
Yes. Then create a string array. An integer array, and a array of type Double(unless credit hours is also just integers). Create a for loop that runs 5 times. Asks the user for subjects, storing each subject in each element of the array. Same thing for The other two arrays. Then you do the calculations like basic math.
Last edited on
ok dude i'm not pretty clear with it. shall i do it for 5 students with 5 subjects OR 5 students who taking 5 subjects and repeat the same process for all 5 students....?
Well, I dont know your instructions so I cant answer that, feel free to post them here if you wish.
ok I was asked to design a program that calculates students GPA for 5 subjects which is programming, chemistry, physics, calculus, and english.

students first need to enter their id and name.

Then they need to enter subject name, credit hour of the subject and mark obtained. This process is repeated for all 5 subjects.

At the end students GPA will be displayed.

I got the program working now. One of the marking criteria is I need to provide 5 sets of test data.
Well it does say students so Im guessing its more than one, but it doesnt look like they've specified the exact amount. So maybe 2 will work?

One of the marking criteria is I need to provide 5 sets of test data.


You're gonna have to ask your professor what he/she means with 5 sets of test data, because I honestly dont.
Last edited on
haha exactly bro. I'm so gona ask her tomorrow. But thank you for the guidance bro. Thank you so much.
Glad I could help, Goodluck to you.
thank you dude.
Topic archived. No new replies allowed.