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
Write a Java program called Decision that includes a while loop to prompt the user to enter 5 marks using the
JOptionPane statement and a System.out statement to output a message inside the loop highlighting a pass
mark >= 50 and <= 100. Any other mark will output a messaging stating it’s a fail.
Example of the expected output is as follows:
55 is a pass
12 is a fail
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a program that will ask the user to input a 4-digit positive integer. If the user inputs a negative integer or an integer that contains less or more than four digits should output a 'wrong input message. You can assume that the user will input an integer. If the user input is valid then the program will calculate and output the sum of the digits in the number (descriptive input/output is required). For example, if the positive, 4-digit number 2345 is entered, the output would be: You entered the value 2345 which sums to 14. Save your file as a pdf titled [Last Name]_[First Namel_[Section] Hmk4-6.pdf. An example file uploaded to eCampus would be Doe_John 501 Hmk4-6.pdf.arrow_forwardWrite a program that will print asterisks in the shape of a diamond. The height of the diamond will depend on the value entered by the user. That value MUST be greater than 0, and it MUST be odd. To make sure that the value is correct, you will validate the value once the user has entered it using a validation loop. Then you will print out a diamond in the pattern demonstrated in the sample execution. Remember that the height will vary based on the user input.arrow_forwardWrite a program that receives an integer input from the user and call it n. Use a for loop, an if condition, and a continue keyword, to find the summation of all numbers that are not a multiple of 3, from 1 to n, including 1 and n and print the result. For instance, the output of your program for 9, should be 27 and for 17 should be 108. You can get an input from user and convert it to an integer using a = int(input('Please enter an integer:')).arrow_forward
- Write a Java program that: Ask user to enter the last two digits of the Student ID number and store it in a variable of type integer; Use a while loop to print all the positive odd numbers smaller than the inputted number. After the while loop, make a for loop to print all the positive even numbers smaller than the inputted Note: Your answer should have the code as text, as well as a screenshot of the code with the output. The inputted number should be the last two digits of your Student ID number. ID is : 190058401arrow_forwardWrite a program with the most appropriate loop that repeats user entered number of times (say the variable counts holds that number), asking the user counts times to enter numbers. The loop should also calculate the sum and the average of the numbers entered. Be sure to include the following: A class header with an appropriately named class. A main method. Use Scanner class for keyboard input. Declare and initialize any necessary variables. Use appropriate loop statement. Display any necessary input prompt and the output.arrow_forwardIt is a python program. Make sure it works and run in IDLE 3.10. Please show the code screenshot and output screenshot.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