Question: Copy / paste the following code into a file and save as StudentRegistration.java. It may or may not compile in its present state, but part
Copypaste the following code into a file and save as StudentRegistration.java. It may or may not compile in its present state, but part of your task is to get it to a compiling state. Notice that you only have to write a portion of the code, this time.
import java.util.Scanner;
import java.util.Random;
public class StudentRegistration
public static void main String args
String name;
int studentID;
String major;
int school;
char taskCompleted;
String messageToStudent;
Scanner scan new ScannerSystemin;
Random rGen new Random;
System.out.printWhat is your name? ;
name scan.nextLine;
System.out.println;
studentID Math.absrGennextInt;
System.out.printlnYour student id number is: studentID;
System.out.println;
System.out.printWhat is your major? ;
major scan.nextLine;
System.out.println;
System.out.printlnWhat school is this?
Engineering
Business
Or any other number for liberal arts;
System.out.println;
System.out.printPlease enter the number: ;
school scan.nextInt;
scan.nextLine;
System.out.println;
Depending on which school the student belongs to
Ask the student the appropriate yesno question
Store the FIRST character of their response inside
the variable taskCompleted
Assign the appropriate String to the variable
messageToStudent
For students in the Engineering school, ask if they have
started their engineering project yet. If so the
message is: "Good for you! Keep me updated on your progress!"
Otherwise: "That's not good at all. It's nearly November!"
For students in the Business school, ask if they have
found an internship yet. If so the
message is: "Congratulations! I know you must have impressed
the company quite a bit."
Otherwise: "You may be out of luck because most of the
internships are probably gone by now."
For students in the Liberal Arts school, ask if they have
started their engineering project yet. If so the
message is: "That sounds interesting, and I look forward to reading it
Otherwise: "You're going to be under a huge time crunch,
if you don't even have a topic by this point."
YOUR CODE GOES HERE
System.out.println;
System.out.printlnmessageToStudent;
Your task, then, is to follow the directions in the comments in order to direct the program to carry out the appropriate steps depending on various conditions. Note that because some values are being assigned at random or based on user input, the output will look different each time you run the program. To this end, I have provided multiple examples of how the output could look.
Program output examples:
Example :
What is your name? Bob
Your student id number is:
What is your major? IT
What school is this?
Engineering
Business
Or any other number for liberal arts
Please enter the number:
Bob, have you started your senior engineering project yet?
no
That's not good at all. It's nearly November!
Example :
What is your name? Bill
Your student id number is:
What is your major? Marketing
What school is this?
Engineering
Business
Or any other number for liberal arts
Please enter the number:
Bill, have you found an internship yet?
yes
Congratulations! I know you must have impressed the company quite a bit.
Example :
What is your name? Jack
Your student id number is:
What is your major? English
What school is this?
Engineering
Business
Or any other number for liberal arts
Please enter the number:
Jack, have you decided on a senior thesis topic yet?
yes
That sounds interesting, and I look forward to reading it
What should go in between YOUR CODE GOES HERE to make the program work?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
