1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ki77a [65]
3 years ago
15

You just bought a new hard drive for your computer. You plan to use this as a secondary hard drive to store all your UMA files.

Once installed, what needs to be done to the drive and what do these two tasks do?
Computers and Technology
1 answer:
Neko [114]3 years ago
4 0
When you get it you need to make Shure the computer knows you have it
You might be interested in
Write a simple command-line calculator with an exception handler that deals with nonnumeric operands. Your program should displa
alexira [117]

Answer:

Here is the JAVA program:

import java.util.InputMismatchException;  // exception that is thrown when input does not match the expected type

import java.util.Scanner;  //used to take input from user

public class Main {

public static void main(String[] args) { //start of main function

   Scanner input = new Scanner(System.in);  // creates Scanner class object

   double num1=0.0;  // double type operand 1

   double num2=0.0;  // double type operand 2

   System.out.println("Please enter 2 operands");  //prompts user to enter two operands

   try {  //defines a chunk of code to be tested for non numeric operand error

      num1 = input.nextDouble();  //reads operand 1 value

      num2 = input.nextDouble(); //reads operand 2 value

         

   } catch (InputMismatchException  ex) {  //code chunk executed when exception occurs in program

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");  //displays wrong operand type if user enters non numeric operands

     System.exit(1);  }//exits the program    

   System.out.print("Enter an operator (+, -, *, /): ");  //prompts user to enter an operator

       char operator = input.next().charAt(0);  //reads the input operator

       double result;  // to store the result of the operation

       switch(operator)         {  //decided operation on basis of input operator

           case '+':  // if user enters + operator

               result = num1 + num2;  //adds two operands

               break;

            case '-':  // if user enters - operator

               result = num1 - num2;  //subtracts two operands

               break;  

           case '*':  // if user enters * operator

               result = num1 * num2;  //multiplies two operands

               break;  

           case '/':  // if user enters / operator

               result = num1 / num2;  //divided two operands

               break;  

           default:  //if user enters wrong operator

               System.out.printf("wrong operator!");  //displays wrong operator

               return;          }  

       System.out.printf("%.1f %c %.1f = %.1f", num1, operator, num2, result); }} //displays the result of the operation

Explanation:

The program is well explained in the comments mentioned with each line of program. The user is prompted to enter the values of two operands num1 and num2. The try block is used to test for non numeric operand error and throws InputMismatchException when any of the input operands (num1 or num2) is non numeric. InputMismatchException is thrown by Scanner class. This informs that the token retrieved (which is the num1 or num2 operand) does not match the expected type (which is type numeric). When this error occurs in the program, catch block is used to execute a code chunk, which is the print statement in this program. The print statement informs the user of the wrong operand type before exiting. It also asks the user to re-input the number to finish the calculation and the wrong input type is also mentioned in the output that is to be re-input.

If you want the program to take the input again from user after throwing this exception then you can alter the above program by using two try catch blocks separately for the two operands:

//for operand 1 i.e. num1

System.out.println("Please enter operand 1: ");

   try {

      num1 = input.nextDouble();        

   } catch (InputMismatchException  ex) {

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");

      num1 = input.nextDouble();  }  //reads input of operand 1 again from user

//for operand 2 i.e. num2

          System.out.println("Please enter operand 2: ");  

      try {

      num2 = input.nextDouble();  

   } catch (InputMismatchException  ex) {

     System.out.println("wrong operand type, re-input " + input.next() + " to finish the calculation.");

     num2 = input.nextDouble();  } //reads input of operand 1 again from user

The program and its output is attached.

8 0
4 years ago
Write a program that inputs the following information from the user, using the Win32 Read-Console function: first name, last nam
Jobisdone [24]

Answer:

Following are program using c#

using System;

class detail

{

 static void Main() // main function

 {

     string first_name,last_name, number1; // variable declaration

     int age1;                             //variable declaration

Console.WriteLine("Enter the First Name  ");

first_name = Console.ReadLine(); // read input by win32

Console.WriteLine("Enter the Last Name  ");

last_name = Console.ReadLine(); // read input by win32

Console.WriteLine("Enter the Age  ");

age1 = Int32.Parse(Console.ReadLine()); // read input by win32

Console.WriteLine("Enter the Phone Number  ");

number1 = Console.ReadLine(); // read input by win32

Console.WriteLine("Following are the data which are  entered  ");

Console.WriteLine("First Name  :"+first_name); // display data

Console.WriteLine("Last Name   :"+last_name); // display data

Console.WriteLine("Age         :"+age1);//display data

Console.WriteLine("Phone Number:"+number1); // display data

 }

}

Explanation:

In this program we have declared  first_name,last_name, number1 variable as the string type and age1 as integer type after that we are taking input from user by win32 Read console i.e Console.ReadLine()  function and finally printed the same  information.

Output:

Enter the First Name

san

Enter the Last Name

lan

Enter the Age

45

Enter the Phone Number

9045454545

Following are the data which are  entered

First Name       :san

Last Name        :lan

Age                   :45

Phone Number :9045454545

4 0
4 years ago
Which of the following are examples of typical problems an ISS professional would encounter? Check all
natali 33 [55]
I’m guessing B! Seems to be the best
8 0
3 years ago
Read 2 more answers
My mom hid my laptop and now I can't find it​
Svetach [21]

Answer: did you look everywhere ask for it and be like mom i wont do (whatever you did) ever again so please give me a chance can i plsss!!!!!! have it back?

Explanation:

simple as that step by step

3 0
3 years ago
If a user cut a section from a photograph where is the cut sections location
madreJ [45]

I would answer, but there isn't enough information to answer for. .

6 0
4 years ago
Other questions:
  • Anyone wanna join a supercar/hypercar enthusiast's club?
    10·1 answer
  • White arrows in the middle of the lane indicate whether the lane must __________.
    8·2 answers
  • Why would it be a bad idea for gateways to pass broadcast packets between networks? What would be the advantages of doing so
    12·1 answer
  • Edhesive coding practice 3.4​
    12·1 answer
  • Please help meh T^T Which of the following describes an application error? Select 2 options.
    5·2 answers
  • I love the brainly update guys! :)
    5·2 answers
  • I need trash talk for a comeback:
    11·2 answers
  • Service and software companies typically have a high return-on-assets ratio because they require lower blank as compared to manu
    11·2 answers
  • Apart from using secure networks, how else can Dhruv keep his deliverables safe in the office and on the go? Select all that app
    8·1 answer
  • A company wishes to begin the process of implementing a multi-party system and is looking for other companies with similar inter
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!