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:
It is not possible.
Explanation:
In this example, we need to accommodate 473 computers for six clients that are 473 IP addresses.
For this request just we have /22 IPv4 address blocks, this mean
22 red bits 11111111111111111111110000000000 <--- 10 host bits
We must increase red bits to 25, we need these 3 bits to create 6 sub red, in this case, 2^3 = 8 sub red.
Why did we ask 3 bits? Because if we ask only 2, 2^2 = 4, and we need 6 sub red.
25 red bits 11111111111111111111111110000000 7 host bits
In this case, we need more than 260 computers, but just we have 7 bits, this means.
2^7 = 128 and just one customer needs 260, for that is impossible.
Pentaprism is a five sided prism with two silvered surfaces giving a non-stop deviation of all rays of light through 90 degress. Used in viewfinders of single-lens reflex cameras
Answer:
The best answer is "D"
server needs ddr4 memory and ddr3 is installed.
Explanation:
Installing ddr4 memory and ddr3 on the server will not allow the server to recognize all of the memory installed at the same time. This will help the technician for the installation one at a time.
The answer is (c.) synthetic rubber
The impeller pump in some outboard motor is made of synthetic rubber. The purpose of the impeller in the motor is for the cooling. It is used to pump the water to the engine from below. It has a standard design and it only uses rubber as the material.