0% found this document useful (0 votes)
15 views1 page

ALL JAVA ASSIGNMENTS CS1102

Uploaded by

donaldandrewmadu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

ALL JAVA ASSIGNMENTS CS1102

Uploaded by

donaldandrewmadu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Programming Assignment

You are tasked with creating a Java program that simulates a simple quiz game. The
program should prompt the user with a series of questions and allow them to enter
their answers. After the user has answered all the questions, the program should
compute and display the final score based on the number of correct answers.

For this assignment, write a Java program that implements the functionality
described in the scenario. Ensure that your program is error-free, compiles
successfully, and produces the expected output. Test your program with different
inputs to verify its correctness.

Make sure the following requirements are met:

o The program should include five multiple-choice questions with four


options.
o The four options should be labeled A, B, C, and D.
o The program should prompt the user to enter their answer by typing
the corresponding letter (A, B, C, or D).
o After the user has entered their answer for each question, the program
should compare it to the correct answer and keep track of the number
of correct responses.
o The program should compute and display the final score as a
percentage of the total number of questions.
o Use if and switch case statements to handle user input and compare it
to the correct answers.
o Include comments to explain the purpose of each section of code and
enhance code readability.

You will be assessed based on the following criteria:

1. Compilation – This transforms the written source code into executable


bytecode.
2. Input Validation – This ensures that the user's input meets certain criteria or
constraints before it is processed further.
3. Logic and Computation - This handles the core functionality and processing of
the quiz.
4. Program flow and structure - It encompasses the overall structure and
behavior of the program.
5. Output - Refers to the information or feedback presented to the user based
on their interactions with the program. Provide a screenshot of the output.
6. Code style and readability - Refers to the way the code is written, organized,
and presented. It focuses on making the code clear, easy to understand, and
maintainable.

You might also like