Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started