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
Elenna [48]
3 years ago
9

Write an if-else statement to describe an object. Print "Balloon" if isBalloon is true and isRed is false. Print "Red balloon" i

f isBalloon and isRed are both true. Print "Not a balloon" otherwise. End with newline.import java.util.Scanner;public class RedBalloon {public static void main (String [] args) {boolean isRed = false;boolean isBalloon = false;using java from there
Computers and Technology
1 answer:
Marat540 [252]3 years ago
6 0

Answer:

if(isBalloon== true && isRed==false) //compare the value of isBalloon variable with true value and isRed variable value with false value.

   System.out.println("Balloon");//Print Balloon

else if(isBalloon== true && isRed==true) //compare the value of isBalloon variable with true value and isRed variable value with also true value.

System.out.println("Red balloon");//Print Red  Balloon

else // when no if condition match it will execute.

System.out.println("Not a balloon"); //Print Not a Balloon

Output:

Not a balloon

Explanation:

The "if-else" statement is defined above for the problem which is given on the question. The detailed explanation of the answer is described below--

  • Firstly we need to check the "true" value for the "isBalloon" variable and "false" value for "isRed" variable. This is done in "if" statement separated with and(&&) operator which gives "true" when both are the true statement.
  • Then we need to check the "true" value for the "isBalloon" variable and "isRed" variable. For this, we need to use "else if" statement which executes when "if" statement is false.
  • Then we need to print the "Not a balloon" statement if both cases are false, for this, we use "else" statement which executes when the "if" and "else if" statement are false.

You might be interested in
Call 334-399-4201 to annoyed my mom
yaroslaw [1]

Answer: why...

Explanation:

3 0
3 years ago
One concern some users have about storing data or accessing applications in the cloud is .
andriy [413]

Answer:

Explanation:

Security is the primary concern about cloud computing. This is the main for many IT departments to refrain from using cloud computing. Some things that put the security of cloud computing to be concerned are: Theft or loss of intellectual property.

3 0
2 years ago
What was your first experience with listening to kpop?
Verizon [17]

Answer:

My first experience with kpop was when I was six I just danced to it lol I forgot the name of the song but it was funny watching the video of me.

Explanation:

8 0
2 years ago
Read 2 more answers
Match each role to the corresponding web development task.
USPshnik [31]

Answer:

1. Art director: selecting color palettes.

2. Web project manager: creating budget spreadsheets.

3. Usability lead: researching target audiences.

4. Developer: coding.

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

The various role performed during the web development process (task) includes;

1. Art director: selecting color palettes. This individual is saddled with the responsibility of choosing the color that best fits a website.

2. Web project manager: creating budget spreadsheets. He or she is responsible for performing tasks such as creating a financial (budget) plan, start and finish date (timing), procurement, etc.

3. Usability lead: researching target audiences. This individual is saddled with the responsibility of surveying and collecting data from the demography for which the website is designed.

4. Developer: coding. This is the technical expert referred to as a web developer and is responsible for writing the set of instructions (codes) that enables the website to work properly and serve a purpose.

8 0
2 years ago
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
astra-53 [7]

Answer:

hhhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Explanation:

5 0
2 years ago
Other questions:
  • What does “int” means in php code
    13·1 answer
  • Two electronics technicians are measuring electrical quantities in circuits. Technician A says that copper, glass, porcelain, an
    11·1 answer
  • Pros and cons of access to a wide range of online services when it comes to an individual's safety?
    14·1 answer
  • Select the correct answer.
    10·2 answers
  • Which of the following is an example of a content management system (CMS)?
    12·2 answers
  • What type of attacks take advantage of vulnerabilities in poorly coded web application software to introduce malicious program c
    9·1 answer
  • ¿Cuales son las empresas mas exitosas que aún usan hoja de cálculo? porfa es urgentee
    6·1 answer
  • Coding 5 - Classes The Item class is defined for you. See the bottom of the file to see how we will run the code. Define a class
    13·1 answer
  • Which of these statements regarding mobile games is true?
    15·2 answers
  • Edit the following statement so it uses the constant named YEAR:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!