Answer:
- import java.util.Scanner;
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
- System.out.print("Please enter two characters: ");
- String inputStr = input.nextLine();
-
- if(inputStr.charAt(0) == 'B' || inputStr.charAt(0) == 'b'){
- System.out.println("Biology");
- }
- else if(inputStr.charAt(0) == 'C' || inputStr.charAt(0)== 'c'){
- System.out.println("Computer Science");
- }
- else if(inputStr.charAt(0) == 'I' || inputStr.charAt(0) == 'i')
- {
- System.out.println("Information Technology and Systems");
- }
- else{
- System.out.println("Invalid major");
- }
-
- int num = Character.getNumericValue(inputStr.charAt(1));
-
- if(num >= 1 && num <= 4){
- switch (num){
- case 1:
- System.out.println("freshman");
- break;
- case 2:
- System.out.println("sophomore");
- break;
- case 3:
- System.out.println("junior");
- break;
- case 4:
- System.out.println("senior");
- break;
- }
-
- }
- else{
- System.out.println("Invalid year status");
- }
-
- }
-
- }
Explanation:
The code consists of two main parts. The part 1 is to validate the input major and print out the major according to the input character (Line 10 -22). If the input character is not matched with the target letters, a message invalid major will be displayed.
The part 2 is to validate the year status to make sure it only fall within the range of 1-4 (Line 26 -45). If within the range, the program will display the year major accordingly. If not a message invalid year status will be displayed.
Answer:
I need to have better photos in order to assist you...
Explanation:
I will attempt to get back with you if you can provide more clearer photos.
Answer:
why are you asking this question
The OS (Operating System) is stored in the ROM on a smartphone. Correct answer: C
ROM stands for Read Only Memory. It is a computer memory that does not require power to store it's data (non-volitile). It's the Internal Memory where the OS is stored. It is partitioned into two parts, one for the OS and the rest for apps to use.
Fact is the confirmation or the validation of an event or object.
<h3>What do we mean by a fact?</h3>
A fact is known to be a form of an indisputable observation in regards to a natural or social scenario.
The definition of the term fact is known to be anything that is regarded as true or that thing that has taken place or has been proven to be right. An example of a fact is the popular notion that the world is round.
Note that a person can see it straightforward and show it to others, hence, Fact is the confirmation or validation of an event or object.
Learn more about Fact from
brainly.com/question/25465770
#SPJ1