write a program in which a class has three data members: name, ID, marks of 5 subjects (int marks[5]) and a member function
Assign() to assign the streams on the basis of table given below:

Avg.Marks Stream
90% or more Computers
80% - 89% Electronics
75%-79% Mechanical
70%-74% Electrial

In main () program you will create an object form the class and execute the Assign() function.
HINT* In the function Assign() you read values for one student (name, ID and 5 marks), after that you have to calculate the
average for the 5 entered marks and at the end based on the average value a corresponding message from stream column to be

Recommended Answers

All 11 Replies

"Help" does not mean "do it for me". Post your code, ask a real question, and stop appearing as if you're trying to cheat on your homework.

dude i really need help and im not acting, this is my exam if you like to help me ok if u dont like to help me again ok but dont post here to make a long chat.

I can't help you until you ask a real question. Just posting your homework assignment is against Daniweb rules.

ok bro tell me what i need to do how to formulate the question.

Post the code you've tried and how it didn't work. We can explain why it doesn't work and offer suggestions for how to fix it.

but here is the problem i don't know how to start this homework it is hard for me because i only know basic things for that reason it is hard for me bro, i understand a litle bit exam i see its says to use arrays but how bro

My usual answer to "I don't know how to start" is, did you pay attention in class? If you didn't, it's tough love, but I'd say that you deserve to fail and should learn the lesson: Nobody will bail you out. It's a lesson that should be learned early, because it's a hard lesson, and it's reality.

I want to help you, I really do. But at this point the only way to do that is to do at least a large part of your homework for you. And from that you learn nothing.

Is it, that you have to have 5 marks and only a table with 4 marks that confuses you?

We pass all lectures of c++ but the problem is when we have exercise like this we cant do WHY i really dony know but also when i have exercise that are simple of course i do those but what i need to learn to do exercise like this.

You could start by making a class with 3 members.
An ID, a name and an array marks, with a Length of 5.
Now how hard can that be if you followed all the C++ lectures?

Let's start by getting a clear idea of what the question is asking. What does "stream" mean in that context? C++ already has a definition for "stream", and it doesn't mesh well with how it's used in your assignment.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.