Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java documented program to perform the role of a quiz maker. The program should work as follows: 1. Prompt the student to enter

Write a Java documented program to perform the role of a quiz maker. The program should work as follows:

1. Prompt the student to enter their user name and password. Read the file "UsersInfo_004.txt", which contains a list of all students information to validate the login credentials. Start the quiz only when the credentials are correct. After 3 failed attempts, exit the program.

2. Randomly pick ten questions from the TestBank.txt file.

3. Display one question at a time. Get the answer then move to the next question.

4. Do not accept answers other than true or false (T or F should be fine too). The answers should not be case sensitive.

5. When the user is done with the quiz, print out a report (On screen and on a file) with the below information in it: First name Last name Score Elapsed time Users answers and the correct answer.

6. Name the file from step 5 as follows: (userName_COSC_236_Quiz_Date_Time), where:

userName is the actual user name of the student who took the quiz.

Date_Time is the date and time of the start of the test.

7. Prompt for another user name and password or done as a user name to exit.

The program should include all or atleast: arrays, methods, files, loops, etc. I can't do anything beyond those topics/more complex because that is all we have learned in class so far. Here is part of the TestBank.txt file:

image text in transcribed

ou need to initalize a variabLe before you can use it. Array indexes always starts at 0 Arrays may not be of any type Once created, an array size can be modified The subscript identifies which element in the array to access. Array of int [10] would have indexes of 0 through 9 The if statement decides whether a section of code executes or not. A boolean expression can result in values other than true or false String is a primitive data type. Java is a object-oriented programmin language All computers must have an operating system The JVM (java virtual machine) can run on a very limited number of computers. RAM is volatile meaning all data is erased when the computer is shut down The short and float data types are the same size (in bytes). In a method header, you can only include 1 exception per "throws" clause. A compiler converts high-level instructions into machine code for execution. Variables must be declared outside of the main method A "break" statement must be used after all cases in a "switch" selection besides the "default" case All elements of an array must be of the same data type The "operator is used to declare a variable. A java source code file contains one or more Java classes. The print method places a newline character at the end of whatever is being print out If you want to express that x greater than or equal to y, then it can express x y The conditionally executed statement should be on the line after the if condition. Arrays allow us to create a collection of like values that are indexed RAM stands for Random Access Memories Char variables can be either upper or lowercase If a source code file has more than one class, only one may be public In Java, not every opening brace needs a closing brace. Single line comments in Java begin with / RAM stands for Random Access Memory In coding all data types use the same amount of memory storage Pixels are dots of color that make up an image If all of the and are taken out of a program it will always run the same as when the and are there When coding constants are generally written in ALL CAPS Desktop computers always have a sperate. monitor The CPU is considered the brain of the computer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago