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
Rainbow [258]
4 years ago
14

Which of the following is generally true about Open Source Software?

Computers and Technology
1 answer:
JulijaS [17]4 years ago
3 0
<span>Open source software is usually free to download and install, and it can be studied, changed, and distributed according to the rights of the software. I don't believe there is any copyright laws on this type of software. The most known open source software is Linux and it's available for most operating systems right now. Typically, open source owners just ask for donations for their work.</span>
You might be interested in
Software that instructs the computer how to run applications and controls the display/keyboard is know as the
andreev551 [17]
Answer:
OS or operating system
5 0
4 years ago
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
What is used to accurately position objects on the slide using a single horizontal and vertical line that intersects in the cent
mars1129 [50]
I think its the ruler c
7 0
3 years ago
Read 2 more answers
John's boss asks for a recommendation for connecting the company network to a small satellite building about 1 km from the main
tresset_1 [31]

Answer:

C. Ethernet over multi mode fiber .

Explanation:

Given that the distance to be covered is 1 km. Multi-mode optic fiber is best suited for short distances of up to 2 km and can withstand harsh environments with less signal attenuation. Single mode fiber is best suited long distance of up to 200 km or more and is expensive as compared to multi-mode fiber Ethernet over twisted pair is best for indoor use and can only cover very short distances. Although UTP and STP are relatively cheap they cannot withstand harsh environments without great signal loss.

4 0
4 years ago
The most popular transmission media option for wired home ethernet networks is ________ cable. fiber-optic power-line unshielded
tino4ka555 [31]
<span>This is called an unshielded twisted pair cable, which is also known as a UTP cable. This type of cable has four pairs of wires that are twisted around each other. Because the wires are like this, the electrical interference is reduced.</span>
3 0
4 years ago
Other questions:
  • Assign a pointer to any instance of searchChar in personName to searchResult.#include #include using namespace std;int main() {c
    5·1 answer
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • Why is an ISA unlikely to change between successive generations of microarchitectures
    11·1 answer
  • In Microsoft Excel, which formula will yield a value of 10? 5x2 5x2*.5+5 =5*1.5 =(100/5*2)*.25
    13·2 answers
  • When you create new document, you have the option to create a blank document or a predifined
    7·1 answer
  • What type of program installs and gathers personal information, including password and account information, from a computer with
    9·1 answer
  • Would a sim card(activated) be able to function on any phone regardless of the companies carrier?
    7·1 answer
  • True or false Encryption prevents hackers from hacking data?
    8·1 answer
  • What messages do we get about ourselves from rap and hip hop
    7·1 answer
  • FIRST ANSWER GETS BRAINLIEST IM GIVING 30 POINTS!!!! Select the correct answer. Emma's project team has to create an application
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!