Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project: Student major and year status Problem Description: Write a program that prompts the user to enter two characters and display the corresponding major and

Project: Student major and year status

Problem Description:

Write a program that prompts the user to enter two characters and display the corresponding major and year status. The first character indicates the major. And the second character is a number character 1, 2, 3, 4, which indicates whether a student is a freshman, sophomore, junior, or senior. We consider only the following majors:

B (or b): Biology

C (or c): Computer Science

I (or i): Information Technology and Systems

Note that your program needs to let the user know if the major or year is invalid. Also, your program should be case-insensitive: your program should tell Biology either user type b or B.

Here are three sample runs:

Sample 1:

Enter two characters: i3

Information Technology and Systems

Junior

Sample 2:

Enter two characters: B5

Biology

Invalid year status

Sample 3:

Enter two characters: t2

Invalid major

Sophomore

What to deliver?

Your .java file including:

1. (Code: 5 points, Comments: 3 points) Your code with other appropriate comments.

2. (2 points) Four sample runs with the following four input: (1) i3

(2) T2

(3) c2

(4) F0

Note that you need to run your program 4 times. Each time you run it, copy and paste the program output to the top of your program. After you finished these 4 runs, comment out the output you pasted so that you program would continue to run without any issue.

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 Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

Evaluate 3x - x for x = -2 Answer:

Answered: 1 week ago

Question

What is group replacement? Explain with an example. (2-3 lines)

Answered: 1 week ago