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:
ooh I have a I phone computer
You could download it to another device, and send the music to the laptop. That, or you can plug it into the USB port.
I hope this helps!
The main factors that led to the fall of the Aksum in the seventh century were climate change and the obstruction of international trade routes around the Red Sea brought on by the growing supremacy of the Muslims in Ethiopia.<span> Other contributing factors included a reduced crop yield due to excess cultivation of land, Persian interference and the rise of Christianity in the region.</span>
Answer:
Quarantine the computer.
Explanation:
Malware can be characterized with negative software capable of causing various damages to a computer, such as theft of data and information, in addition to damage to devices.
In order to avoid having your computer infected with malware, it is essential to have installed reliable malware-checking software, in addition to taking all appropriate security measures when accessing the internet and never clicking on unknown or suspicious links.
Therefore, when realizing that the computer has been infected by malware, it is necessary to quarantine the computer and immediately disconnect from a network so that it does not infect other computers. The quarantine acts as an action where the infected file is moved to an encrypted folder where the malware cannot be executed and spread by the operating system.