Question: Assuming that a class named CulinaryCompetion has already been declared and implemented and that its header file is as follows: #ifndef CULINARY _ COMPETITION _
Assuming that a class named CulinaryCompetion has already been declared and implemented and that its header file is as follows:
#ifndef CULINARYCOMPETITIONH
#define CULINARYCOMPETITIONH
#include
using namespace std;
class CulinaryCompetition
private:
string entrantName;
string dishName;
int score;
public:
void enterDetailsstring string;
int getScore const;
void setScoreint;
void displayEntryDetails;
;
#endif
Write a full program that:
includes the correct header file
In the main function create an instance of the CulinaryCompetion class
call the enterDetails method on the instance you created passing as the parameters the variables myName, and myDish that you can assume have already been declared and are available to you.
call the setScore method, using the myScore variable that you can also assume is available as a parameter
call the displayEntryDetails method on the same instance.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
