Write a program (main method) that advises the user on programming language. So if a user for instance enters "Java" the program might say "awesome" or if the user enters "Ruby" it might say "are you sure?" . Make the program comment on at least 5 programming languages.

Answers

Answer 1
Answer:

import java.util.Scanner;

public class JavaApplication41 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       String language = scan.nextLine();

       if (language.toLowerCase().equals("java")){

           System.out.println("Awesome!");

       }

       else if (language.toLowerCase().equals("python")){

           System.out.println("A very simple language!");

       }

       else if (language.toLowerCase().equals("ruby")){

           System.out.println("Are you sure?");

       }

       else if (language.toLowerCase().equals("javascript")){

           System.out.println("Easy enough");

       }

       else if (language.toLowerCase().equals("c")){

           System.out.println("Cool!");

       }

   }

   

}

I hope this helps!


Related Questions

Write a program that asks the user to enter two numbers,obtains the two numbers from the user and prints the sum,product,difference, and quotient of the two numbers
Write out the base sequence that is added directly after the primer. In order for Moodle to correctly grade this question, write only the letters representing the bases, write your answer in 5' to 3' direction, and do not have any spaces between the letters and do not label the 5' and 3' ends.
What is copyright and what are your thoughts on it?
Which of the following are key corporate assets?A) intellectual property, core competencies, and financial and human assetsB) production technologies and business processes for sales, marketing, and financeC) knowledge and the firm's tangible assets, such as goods or servicesD) time and knowledge
Communicators do not have an ethical responsibility to share information that other people require to make informed decisions.True/False

What type of malicious software masquerades as legitimate software to entice the user to run it?

Answers

Answer:

Trojan horse

Explanation:

A Trojan horse is malicious software that masquerades as a legitimate computer program such as a video game, image file, utility program, or even an antivirus so as to entice the user to run it, thereby allowing an attackers (the developer of the malicious program) to gain access to the data on the computer in an illegal manner.

Which of the following is NOT a typical action of the catch block?Select one:
a. Throwing the exception
b. Completely handling the exception
c. Rethrowing the same exception for the calling environment
d. Partially processing of the exception

Answers

Answer:

A.

Explanation:

because its throwing the exception

In the early days of computer technology, which system was justified because data-processing personnel were in short supply, hardware and software were expensive, and only large organizations could afford computers

Answers

Answer:

Centralized Processing

Explanation:

Centralized processing was developed to process all of the data in a single computer, and since the first computers were stand-alone with all input and output devices in the same room, only the largest organizations could afford to use centralized processing.

Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor and mutator methods, and a public toString() method. Then create a Fruitand a Vegetableclass that are derived from Produce. These classes should have constructors that take the nameas a Stringand invoke the appropriate constructor from the base class to set the name.Also, they should override toStringmethod to display the nameof the produce and its type. For instance, Mangois a Fruitand Caulifloweris a Vegetable. Finally, create a class called TruckOfProducethat will keep track of the boxes of Vegetablesand Fruitsadded in to the truck. This class should use an array of Produceto store both Vegetableand Fruitobjects.

Answers

Answer:

you suck

Explanation:

Which key do programmers use to end running programs?Num Lock
Scroll Lock
Pause/Break
Backspace

Answers

I would answer backspace because i had some experience with that
Pause/Break   i would say

Write an if statement that assigns 100 to x when y is equal to 0. 32. Write an if/else statement that assigns 0 to x when y is equal to 10. Otherwise it should assign 1 to x. 33. Using the following chart, write an if/else if statement that assigns .10, .15, or .20 to commission, depending on the value in sales. Sales Commission Rate Up to $10,000 10% $10,000 to $15,000 15% Over $15,000 20%

Answers

Answer:

1.  

if(y==0.3){ x = 100;}

2.

if(y == 10){

x = 0; }

else {

x = 1; }

3.

if(sales< 10000){

commission = 0.10;

}

else if(sales>= 10000 && sales <= 15000 ){

commission = 0.15;

}

else{

commission = 0.20;

}

Explanation:

The statements written in brackets represent the conditions while the statements in {...} represent the operation that would be executed depending on the outcome of the if statement.

For 1: if(y==0.3){ x = 100;}

If y is 0.3, 100 would be assigned to x

For 2:

if(y == 10){ x = 0; }

If y is 10, 0 would be assigned to x

else { x = 1; }

If otherwise, 1 would be assigned to x

For 3:

if(sales< 10000){commission = 0.10;}

Is sales is less than 10000, commission would be 0.10

else if(sales>= 10000 && sales <= 15000 ){commission = 0.15;}

If sales is within range of 10000-15000, commission would be 0.15

else{commission = 0.20;}

If otherwise, commission would be 0.20