Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a Java program that generates random numbers with your ID (200001938) as the Class Name. Use a Do-While loop and a method to

1. Write a Java program that generates random numbers with your ID (200001938) as the Class Name. Use a Do-While loop and a method to display a Menu Interface with the following options 1 - Register 2 - View When the user selects option 1: The program must ask the user to register by taking the following details with the help of a method called Register a. Index Number b. First Name c. Last Name d. Department e. Level f. Age This information must be written to a text file called Random Numbers. The program must now use a For loop to generate the random numbers with the users age as the seed in the following format: XXXX - XXXX - XXXX (where X can be any alphanumeric character)

When the user selects option 2: The program asks for the users Index Number The program checks if a random number has been generated for the user previously in the text file. If Yes: the program displays the Random Number If No: the program displays an error message using Try-Catch and displays the menu screen again.

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

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago