
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
![533256.4063714.qx3zqy7
Jump to level 1
When the input integer variable suitcaseSize is:
• less than or equal to 42, output "Too light".
• between 42 exclusive and 122 inclusive, output "Checkable".
greater than 122, output "Too big".
End with a newline.
► Click here for examples
1 import java.util.Scanner;
3 public class Suitcase {
0 00 ташриNE
2
4
5
6
7
8
9
10
11
12
13
14 }
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int suitcaseSize;
suitcaseSize = scnr.nextInt ();
/* Your code goes here */
}
I](https://content.bartleby.com/qna-images/question/c2db231c-5eec-4c39-83ec-48e578521dea/bce023be-7e51-4be1-a54f-fe8e06790325/nhz7jag_thumbnail.jpeg)
Transcribed Image Text:533256.4063714.qx3zqy7
Jump to level 1
When the input integer variable suitcaseSize is:
• less than or equal to 42, output "Too light".
• between 42 exclusive and 122 inclusive, output "Checkable".
greater than 122, output "Too big".
End with a newline.
► Click here for examples
1 import java.util.Scanner;
3 public class Suitcase {
0 00 ташриNE
2
4
5
6
7
8
9
10
11
12
13
14 }
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int suitcaseSize;
suitcaseSize = scnr.nextInt ();
/* Your code goes here */
}
I
SAVE
AI-Generated Solution
info
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
to generate a solution
Click the button to generate
a solution
a solution
Knowledge Booster
Similar questions
- Assign is Teenager with true if kidAge is 13 to 19 inclusive. Otherwise, assign is Teenager with false. 439894.2564214.qx3zqy7 1 import java.util.Scanner; □NM nor 2 3 public class TeenagerDetector { 4 5 6 7 8 9 10 11 12 13 14 15 16 17 public static void main (String [] args) { Scanner scnr = new Scanner(System.in); boolean isTeenager; int kidAge; kidAge scnr.nextInt(); * Your solution goes here if (isTeenager) { System.out.println("Teen"); } else { System.out.println("Not teen");arrow_forwardWhen the given integer variable numberOfTools is: less than 14, output "Small tool box". between 14 inclusive and 39 inclusive, output "Mid-sized tool box". greater than 39, output "Need wall storage". End with a newline. Ex: If the input is 13, then the output is: (in java) Given Code: import java.util.Scanner; public class ToolDetails {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);int numberOfTools; numberOfTools = scnr.nextInt();arrow_forwardWrite code that outputs variable numDays as follows. End with a newline. Ex: If the input is: the output is: Days: 3 1 import java.util.Scanner; 2 3 public class OutputTest { public static void main (String [] args) { int numDays; 4 6. // Our tests will run your program with input 3, then run again with input 6. // Your program should work for any input, though. Scanner scnr = new Scanner(System.in); numDays 7 8 9. 10 scnr.nextInt(); 11 12 /* Your code goes here */ 13 } 15 } 14arrow_forward
- Help me fix the code make it run out like the EXPEarrow_forwardA shuttle van picks up passengers and drives them to a destination, where they leave the van. Keep a count of the boarding passengers, but don't allow boarding if the van is full. Update the odometer when the van drives. Van.java 1 /** This class models a shuttle van. */ 4 public class Van // Instance variables /** Constructs a van with a given capacity. @param maxPassengers the maximum number of passengers that this van can hold */ public Van(int maxPassengers) { 10 11 12 13 14 15 16 17 18 19 20 21 55 } /** Boards passengers up to the capacity of this van. @param boardingPassengers the number of passengers attempting to board */ public void board(int boardingPassengers) { 25 26 27 28 } /** Drives the van and discharges the passengers. @param distance the distance driven */ public void drive(double distance) { } 38 40 41 42 43 /** Gets the number of passengers in this van. @return the number of passengers */ public int getPassengers() { 44 45 46 47 48 49 50 51 /** Gets the number of…arrow_forwardJavaScript: const d = 4let a = 1if (true) {let a = 4var b = 2if (a < 5) {var c = 1b = 5}}console.log(a + b + c) What is is the output and why? a) The output is 7 because a, b, c and d are globally scoped variables b) The output is 11 because a, b, and c are all globally scoped variables while d is a block scoped variable c) The output is 7 because b and c are globally scoped variables d) The output is 6 because a is a block scoped variable and b is a globally scoped variablearrow_forward
- Please show your code and result to solve this.arrow_forwardJava Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A, B, C, D, E" is correct. Each question has one correct answer. Thank you. Part 1 - Given the following code, the output is __. class Sample{ public static void main (String[] args){ try{ System.out.println(5/0);}catch(ArithmeticException e){ System.out.print("Divide by zero????");}finally{ System.out.println("5/0"); } }} A. Divide by zero????B. 5/0C. Divide by zero????5/0D. 5/0Divide by zero????E. "5/0" Part 2 - Given the following code, the output is __. try{ Integer number = new Integer("1"); System.out.println("An Integer instance.");}catch (Exception e){ System.out.println("An Exception.");} A. An Integer instance.B. An Exception.C. 1D. Error: ExceptionE. None of the optionsarrow_forwardInteger userValue is read from input. Assume userValue is greater than 1000 and less than 99999. Assign tensDigit with userValue's tens place value. Ex: If the input is 15876, then the output is: The value in the tens place is: 7 2 3 public class ValueFinder { 4 5 6 7 8 9 10 11 12 13 GHE 14 15 16} public static void main(String[] args) { new Scanner(System.in); } Scanner scnr int userValue; int tensDigit; int tempVal; userValue = scnr.nextInt(); Your code goes here */ 11 System.out.println("The value in the tens place is: + tensDigit);arrow_forward
- Grey lines of code can NOT be edited. NEW JAVA code inbetween lines 11 - 14 in photo. TIP:arrow_forwardI need this debugged. Thanks in advance. // Application looks up home price// for different floor plans// allows upper or lowercase data entryimport java.util.*;public class DebugEight3{public static void main(String[] args){Scanner input = new Scanner(System.in);String entry;char[] floorPlans = {'A','B','C','a','b','c'};int[] pricesInThousands = {145, 190, 235};char plan;int x, fp = 99;String prompt = "Please select a floor plan\n" +"Our floorPlanss are:\n" + "A - Augusta, a ranch\n" +"B - Brittany, a split level\n" +"C - Colonial, a two-story\n" +"Enter floorPlans letter";System.out.println(prompt);entry = input.next();plan = entry.charAt(1);for(x = 0; x < floorPlans.length; ++x)if(plan == floorPlans[x])x = fp;if(fp == 99)System.out.println("Invalid floor plan code entered");else{if(fp >= 3)fp = fp - 3;System.out.println("Model " +plan + " is priced at only $" +pricesInThousands[fp] + ",000");}}}arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education