Question: Please convert this C++ code into Java Langauge with create the class of GUI. Thanks #include #include using namespace std; int Guess; int Total; class

Please convert this C++ code into Java Langauge with create the class of GUI. Thanks

#include #include using namespace std;

int Guess; int Total;

class Question { private: string Question_Text; string Answer_1; string Answer_2; string Answer_3; string Answer_4; int Correct_Answer; int Question_Score; public: void setValues (string,string,string,string,string, int, int); void askQuestion(); };

int main() {

cout<<"Welcome to the Quiz Master"<

string Name; cout<<"What is your name?"<> Name; string Respond; cout<<"Are you ready to take the quiz, "<>Respond;

if (Respond == "yes") { cout<

} else if (Respond == "no")

{ cout<<"Goodbye!"<

Question q1; Question q2; Question q3; Question q4; Question q5; Question q6; Question q7; Question q8; Question q9; Question q10;

q1.setValues("what is the synonym of stupid?", "dumb", "smart", "clever", "genious", 1, 10);

q2.setValues("what is the synonym of beautiful?", "helpful", "happy", "ugly", "pretty", 4, 10);

q3.setValues("what is the synonym of stretch?", "fetch", "intense", "expand", "tease", 3, 10);

q4.setValues("what is the synonym of happy?", "negative", "impossible", "joyful", "hateful", 3, 10);

q5.setValues("what is the synonym of good?", "dream", "excellent", "recycle", "mean", 2, 10); q6.setValues("what is the antonym of dark?", "bright", "green", "dim", "cloudy", 1, 10);

q7.setValues("what is the antonym of sucessful?", "stright", "pass", "fullfil", "fail", 4, 10); q8.setValues("what is the antonym of tight?", "tiny", "small", "loose", "stress", 3, 10); q9.setValues("what is the antonym of advantage?", "benefit", "disadvantage", "favor", "improvement", 2, 10); q10.setValues("what is the antonym of strong?", "hard", "soft", "weak", "power", 3, 10);

q1.askQuestion(); q2.askQuestion(); q3.askQuestion(); q4.askQuestion(); q5.askQuestion(); q6.askQuestion(); q7.askQuestion(); q8.askQuestion(); q9.askQuestion(); q10.askQuestion();

cout<<"Your total score is "<

if(Total >= 70)

{ cout<<"Great, you passed the quiz!"<>Guess; if (Guess == Correct_Answer) { cout<

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!