Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 (12 MARKS) Write Java statements that perform the following functions: 2.1 The String Hello World' will be displayed if an integer variable state

image text in transcribed

Question 2 (12 MARKS) Write Java statements that perform the following functions: 2.1 The String Hello World' will be displayed if an integer variable state has a value less than 9 and greater than 20. (2) 2.2 A school committee wants a report indicating all the scholars in certain districts Write a statement that correctly outputs the name of a scholar that lives in district 2 or 3 Assume the integer variable district represents the district numbers and the String variable scholar the name of the voter, (2) (TURN OVER] CSJA1DP OCTOBER/NOVEMBER 2019 2.3 Below is the menu for the Big Bens Burger Bar. Write a statement to calculate the cost of an order. Assume the integer variable quantity represents the number of hamburgers ordered and the String variable item the type of burger ordered Item Hamburger Cheese Burger Egg Burger Cost 20.99 25.99 2 3.50 2.4 Write a switch statement that outputs the colour description represented by a character (the character is represented by a char variable named colour). Use the table below. Character TRP Colour Description Red Blue Yellow Unknown color 'B' other

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions

Question

Conduct a survey to determine the major worry of college students.

Answered: 1 week ago