Microsoft Word - Java-2 Assignment-3 .docx Object Oriented Programming-2 using Java Assignment-3 Class # 1211_34751 MM – 20 Weightage – 10% Note – This assignment requires Implementing Programs. All...

1 answer below »
fille attached



Microsoft Word - Java-2 Assignment-3 .docx Object Oriented Programming-2 using Java Assignment-3 Class # 1211_34751 MM – 20 Weightage – 10% Note – This assignment requires Implementing Programs. All parts are compulsory. All labs/assignments are individual assignments unless specified by the instructor and must be completed individually by all students; please refer to the Academic Honesty document located at;- https://caps.sheridancollege.ca/student-guide/academic-policies-and-procedures.aspx Submission guidelines:- Important – No UML or Javadoc is required for this assignment a. Word Document - java code and output screenshots of execution of program from Netbeans terminal. b. Make a Project and zip it. c. Upload word document and zip folder to slate dropbox. d. This assignment requires 2 classes i.e. a JavaQuiz and JavaQuizDemo class (to demonstrate the use and accurate implementation of JavaQuiz class). Rubrics:- I. Points A to B (each point * 2): 2 Marks II. Points C to F(each point*2):8 Marks III. Demo Class code – 4 Marks IV. Execution screenshot and correct Output: 2 Marks V. Zip folder and Word Document Submission for program: 2 Mark VI. Appropriate name for class / variable / method: 2 Mark 2. Write a program to create JavaQuiz class to represent Multiple Choice Quiz. The class must contain:- a. Score - variable of type int which is 0 by default. b. Two dimensional array named questions having 3 rows and 6 columns to store Questions, multiple choices of answers and a correct answer. So, if a Question is having 4 choices and 1 correct answer then each row in Array would be having 6 columns for storing Question, choice1…choice4,Correct Answer. setQuestion() required to set the Array to Questions, choices and answers. Here is an example Array Structure;- Array structure should look like:- What is Java? A. Java is procedural Lang B. Java is OOP Language C. java is not a language D. java is not a language B Stack is a ? A. User defined class B. Collection Class C. Both A and B D. None of these B Latest Version of JavaFX is ? A. 6 B. 2 C. 11 D. 14 C c. setQuestions() method – which is required to fill array with above specified data. Make sure to set the array manually, Scanner should not be used for setting Questions. d. attempTest() methods –which represents all questions to user one by one and get response from user. [Hint: for loop can used to iterate through array, Make sure not to show last column of array as it contains answer] e. checkResult() method which checks if answer for each question is correct or not. If answer is correct then displays message correct and increments score by 1 otherwise displays message incorrect and score should not be changed in case answer is incorrect. f. toString() method – To print final score once attempt is complete. It should also print message passed if user scored 60% or above, otherwise should print “Need to do it again”. g. Create a JavaQuizDemo class to test your code by calling methods to attempt quiz and print Scores. For each method specified above may or may not have arguments, that’s completely dependent upon your program structure. Number of methods can be increased or decreased based on requirement. Here is a sample run:- Stack is a ? A. User defined class B. Collection Class C. Both A and B D. None of these Enter Answer A Incorrect Latest Version of JavaFX is ? A. 6 B. 2 C. 11 D. 14 Enter Answer Correct score 2 Passed
Answered 18 days AfterMar 24, 2021

Answer To: Microsoft Word - Java-2 Assignment-3 .docx Object Oriented Programming-2 using Java Assignment-3...

Arun Shankar answered on Apr 12 2021
139 Votes
import java.util.Scanner;
public class JavaQuiz
{
    double score;
    String[][] questions;
    
    
    
JavaQuiz()
    {
        score = 0;
        questions = new String[3][6];
    }
    
    public void setQuestion()
    {
        questions[0][0] = "What is Java?";
        questions[0][1] = "A. Java is procedural Lang";
        questions[0][2] = "B. Java is OOP Language";
        questions[0][3] = "C. java is not a language";
        questions[0][4] = "D. java is not a language";
        questions[0][5] = "B";
        
        questions[1][0] = "Stack is a?";
        questions[1][1] = "A....
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here