Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. What is the output of the following code? public class ScoreTest { public static void main(String[] args) { double IELTSTotal=26; double score = 10*IELTSTotal/40;

5. What is the output of the following code?
public class ScoreTest {
public static void main(String[] args) { double IELTSTotal=26;
double score = 10*IELTSTotal/40; switch((int)score)
{
case 10:
case 9:
case 8:
case 7:
System.out.println("You are accepted! "); break;
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:
System.out.println("You are not accepted!"); break;
default:
System.out.println("Error! Please try again!"); }
} }
[3 marks]
Computing 1 Coursework 2 Questions
6. Write a program to extend the code given in question 5.
a. Your program should take IELTSTotal as an input through the keyboard.
b. Your program will continue to accept input and display the outcome until user
enters "n" key for "Do you want to continue? y" prompt.
image text in transcribed
Computing 1-Cork Questions 13 mars 5. What is the output of the following code? public class Score Test public static void main(Stringar double IELTSTotal 26: double score 10'IELTSTotal/40 switchfit score) case 10 Case 9 case : case 2: System.out.println("You are accepted break case 6 case 5: case 3: case 2: case 1: case 0 System.out.println("You are not accepted!"); break; default System.out.println("Error! Please try again!" 6. Write a program to extend the code given in questions Your program should take IELTS Total as an input through the keyboard t. Your program will continue to accept input and display the outcome until ser enters "n" key for "Do you want to continue? prompt. Comprar GSISIS

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_2

Step: 3

blur-text-image_3

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

Students also viewed these Databases questions

Question

Which Department Century is the worst performing?

Answered: 1 week ago