Select Page

Brookhaven College Data Type Class Class Candidate UML Diagrams & Flowchart Exercise

Question Description

DATA TYPE CLASS

Class CandidateDriver_yourLastName

-This class hold data members: last name (String), first name (String), SSNumber(String), Driver’s license number (String), address(String), answerArray(char array size 25)

-constructors: the constructor initializes values for lastname, firstname, SSNumber, driverLicenseNumber, address, and initializes the char answerArray with size 25

* The driver license is generated by random number with 8 digits and test date is generated as current date

-method evaluateResult() accept answerArray and keyArray to determine the result and mark the failed questions list. If the candidate having 20 or more correct answers over 25 questions will be passed; otherwise he will be failed

-method toString() prints the result in the following format.

FA2020_DriverLicenseTest_Smith.java

DRIVER TEST RESULT – JAMES SMITH

———————————————————————

Driver’s name: Lane, Mary

SS Number: 112233440

Address:123 Plano Rd Dallas TX 75243

Driver’s License: 12345678

Test date:08/15/2020

Result: PASSED

Missed Questions: 5, 12, 15

-You can add more methods if you need

REQUIREMENT

-Change yourLastName to your last name

-Change Smith to your lastname

-Change James Smith to your full name

-Change Mary Lane to the name that users type in for input

DRIVER CLASS

Class FA2020_DriverLicenseTest_yourLastName:

The local driver’s license office has asked you to write a program that grades the written portion of the driver’s license Rules and Signals Test.

The driver license test has 25 multiple choice questions. The key set is:

ANSWER LIST

ANSWER LIST

ANSWER LIST

ANSWER LIST

ANSWER LIST

1.A

6.B

11.C

16.B

21.B

2.C

7.C

12.A

17.A

22.C

3.B

8.D

13.B

18.C

23.A

4.B

9.A

14.C

19.A

24.D

5.D

10.B

15.A

20.D

25.B

The program should declare the keySet as a char array constant.

First, the application displays messages to ask for the information of current candidate about last name, first name, SS number, address to create a Test account as an object of class DriverCandidate_yourLastName to pass all these information in.

When the candidate is ready, display the test instruction, questions and read answers

DRIVER LICENSE TEST

THERE ARE 25 MULTIPLE CHOICE QUESTIONS

YOU HAVE TO GET AT LEAST 20 CORRECT ANSWERS TO GET PASSED

————————————————————

Question 1: _

The users answer the question bytyping a letter A, B, C or D for each question. The program will read these answers and store to an answerArray.

If users type other keys than A, B, C or D; display message “Invalid key – Retype” and allow users to retype the answer of current question before moving on

The answerArray and the keySet should be sent to the Test account by calling the method of class CandidateDriver_yourLastName to evaluate the result

The result will be displayed on the screen in the requested format by call a method of class CandidateDriver_yourLastName

HOW TO DO EACH PART

PART 1: Create a word document FA2020_LAB6PART1_YourLastName.docx to answer questions

PART 2:

*Step1: Read the requirement of each part, recognize the objects the requirement talk about to make decision which data type classes we need for the project. Create the UML of each data type class

Also, read the requirement to write the pseudo-code or draw the flowchart to determine what step by step you suppose to do in main() of driver class such that the program is qualified to the requirement

*Step2:

-start editor (for example eclipse) create the project with the following project name:

FA2020_LAB6PART2_yourLastName (part 2)

-add data type class (file with extension .java)

Class: CandidateDriver_yourLastName (par2)

Class: FA2020_DriverLicenseTest_yourLastName (part2)

*Step3: Based on the UML of data type class, write the code of data type class

Based on the pseudo-code or flowchart, write the code of main() in driver class

*Step:4 compile and run the program

*Step5: debug if there are any errors to complete the program

DATA TYPE CLASS:

-to initialize an array you should use the for loop

-to display the values of all elements of an array, you should use the for loop

-when you determine the result: Create a result array of the int and initialize its element to 0. During the time you compare the value of each element of key array to the value of each element of answer array. If they are the same you should set 1 at that question on the result array.

-The value 0 in the result array will determine the incorrect answer in the report

DRIVER CLASS:

-After reading the information of the candidate, display the instruction to let the candidate know that he/she should type A, B, C, D, to answer the questions; then display the number of questions to pause for the answer.

All the information, the answer array and the key array will be passed to the object of data type class.

-Display the result by using the object to access the method of the data type class.

*Change Smith to your last name

*Change JAMES SMITH to your full name

*Change Mary Lane to the name of user

*Write the file name as the first comment line at the top of program

*Write the comments to explain each part of the program

*After running your program, get the picture of the output window from your program with your name on to paste at the bottom of the pseudo-code to turn in

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now