1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
arlik [135]
4 years ago
8

1. (8 pts) Write an application that is including a three-question multiple choice quiz about Java programming language. Each qu

estion must have four possible answers (numbered 1 to 4). Also, ask user to type 0 to exit the test. [Assume that a user enters only integers 1,2,3,4, or 0]. Firstly, display a message that this quiz includes three questions about the Java programming language and display that each question has four possible answers. If the answer is correct for the given question, display that the answer is correct. If the answer is not correct for the given question, display that the answer is wrong. If the user answers three questions correctly, display "Excellent", if two, display "very good", if one or fewer, display "It is time to start to learning Java". After that, ask user whether he or she wants to play again [you can use a boolean variable]. If user inputs true, start the game again. If user inputs false, then display a goodbye message and finish the game [Assume that user enters only true or false]. UPLOAD MyTest.java
Computers and Technology
1 answer:
soldi70 [24.7K]4 years ago
4 0

Answer:

Answer has been attached to this response as a source code file saved as "MyTest.java". Please download the file to check the answer.

Explanation:

Explanation has been added to the answer in the form of comments to the code. Please read the comments carefully to get a clear understanding of the code.

Download java
You might be interested in
Prepare a algorithm visualization for the Tower of Hanoi when 4 disks are to be moved from spindle #1 to spindle #3.
Setler [38]

Answer:

follwing is the code for Tower of Hanoi for n disks.

#include <iostream>

using namespace std;

void towofhan(int n,char source,char aux,char dest)//function for tower of hanoi..

{

if(n<0)

return ;

   if(n==1)//base case.

   {

       cout<<"Move disk 1 from "<<source<<" to spindle "<<dest<<endl;

       return;

   }

   towofhan(n-1,source,dest,aux);//recursive call.

   cout<<"move disk "<<n<<" from "<<source<<" to spindle "<<dest<<endl;

   towofhan(n-1,aux,source,dest);//recursive call.

}

int main() {

   int n=4;

   towofhan(n,'1','2','3');//function call.

   return 0;

}

Explanation:

If there is only 1 disk then we have to move the disk from source to destination.

Then after that we will apply recursion to solve the problem.

We have to work on only nth disk else will be done by the recursion.

First call recursion to move n-1 disks from source to auxiliary.

Then move nth disk from source to destination spindle.

Now move n-1 disks that are on the auxiliary spindle to destination spindle.

6 0
3 years ago
Whenever I go onto Google Chrome, the words are in Spanish! How can I make the words be back in English again? Please let me kno
ivann1987 [24]

Answer:

Go to google setting look up english on setting bar and it should have the option to change or add languages make sure you press save when choosing english

Explanation:

5 0
3 years ago
What's the difference between an exe file and an msi file?
tatiyna

Answer: <u>EXE files are mainly used to indicate that the file is executable</u>

<u>MSI files show that the file is a Windows Installer</u>

<u />

Explanation:

EXE files are mainly used to indicate that the file is executable

MSI files show that the file is a Windows Installer

<u>MSI files are only used with launchers, EXE does not need to be used with launchers </u>

Hope this helped :)

5 0
2 years ago
What is the different between information and data
Vika [28.1K]
Data is an individual unit that contains raw materials which do not carry any specific meaning. Information is a group of data that collectively carries a logical meaning.
7 0
3 years ago
Larry recently viewed an auction listing on a website. as a result, his computer executed code that popped up a window that aske
RUDIKE [14]
<span>Larry recently viewed an auction listing on a website. as a result, his computer executed code that popped up a window that asked for his password. The type of attack larry had likely encountered is the </span><span>Cross-site scripting (XSS).</span>
4 0
3 years ago
Other questions:
  • What does BMP stand for?
    10·2 answers
  • Which of the following refers to the data analysis software and interactive software that allow managers to conduct analyses and
    6·1 answer
  • What term best describes when the scope of the project changes from what was initially agreed upon?
    8·1 answer
  • Which of the following is an easy steps to take to avoid ESSD well working on your computer?
    5·1 answer
  • When a hoverboard's battery dies, does the hoverboard battery life get impacted the next time the battery is full?
    12·1 answer
  • Which of the following is considered to be open-end credit?
    6·2 answers
  • Question 8 of 10
    12·1 answer
  • What does c++ programming mean?
    7·1 answer
  • Classes that depend on field names from parent classes are said to be ____ because they are prone to errors.Group of answer choi
    14·1 answer
  • A(n) ____ is a live internet presentation that supports interactive communications between the presenter and the audience.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!