Answer to Question #228877 in C++ for Onai Maxwell

Question #228877
The Nobel peace prize. The process of selecting the winners for the various prices have been criticized as being biased especially from the side of the panel members. The committee of experts at a general council meeting decided to automate the selection process. On a trial bases, you have been engaged to develop a system that will automatically select a nominee as the winner of the award in two categories (peace and science). Your program should have the following functionalities.

a) Define a class named NobelAward. Your class must have two
functions, one of the functions should be named AwardCategory, and the
other function should be named AwardWinner. Your AwardCategory
must have a string argument and return the string when called. Your
AwardWinner function must contain two parameters, one should be a string called name and the other an integer called votes. When called (AwardWinner) it should return the name and highest votes as the winner for a particular category.
1
Expert's answer
2021-08-23T13:40:51-0400
class NobelAward{
    string AwardCategory(string s){
        return s;
    }
    void AwardWinner(string s, int n) {
        cout << s << ' ' << n;
    }
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS