Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please explain how you Purpose: For this assignment, students will create two softwares merged into one and allow the user to choose which

Can you please explain how you

image text in transcribed
Purpose: For this assignment, students will create two softwares merged into one and allow the user to choose which software they would like to run during the bootup. The first software primarily focuses selection while the second software focuses on loop. Prompt 1: (45 pts) Imagine a software that allows the user to input stream of numbers and only terminates the software if and only if the user has input "-0", "-0.0", or its variants. Once the user has input the termination number, please return the largest, smaller, and average of the two. Sample program is shown below: Please enter the stream of inputs: 99 10 15 4 8 12 13 0 -130 -0 The largest input is: 99.0 The smallest input is: -130.0 The midpoint of min and max is: -15.5 Note: Inputs are 99, 10, 15, 4, 8, 12, 13, 0, -130, and -0. 0 does not stop the program but -0 did. Please enter the stream of inputs: 999 -100 -0 -999 The largest input is: 999.0 The smallest input is: -100.0 The midpoint of min and max is: 449.5 Note: Inputs are 999, -100, -0, and -999. Keep in mind that -999 is ignored since it comes after -0 for -0 is the termination number. Prompt 2: (45 pts) Imagine a software that asks the user for a number (N). Then, it allows the user to input one less than the given number (N - 1 times). The user may input any numbers from 1 to N and the software returns the missing number. Please note that for this specific problem, the input must be integers. Sample input/output can be seen below: Please enter how many numbers there should be: 5 5 3 2 1 The missing number is: Prompt 3: (10 pts) Asks for user input to choose between Prompt 1 and Prompt 2 as shown below: Please choose [pl] or [p2] : pl Please enter the stream of inputs: 99 -99 0 -0 The largest input is: 99.0 The smallest input is: -99.0 The midpoint of min and max is: 0.0 Please choose [pl] or [p2] : p2 Please enter how many numbers there should be: 10 1 2 4 8 9 10 7 6 3 The missing number is: 5 Requirement/Restriction: You are not allowed to use break/continue . You may only use Scanner as an import and only one import statement is allowed o Meaning, no "import java.util.*;" NOTE: IF YOU BREAK ANY OF THE FOLLOWING RULES, YOU WILL NOT GET CREDIT FOR THE ASSIGNMENT. Hint(s) and Tip(s): Brainstorm your solution on paper before implementing (this is really important for every program you write to avoid spaghetti code) If you got help from other student(s), cite in case you guys have similar codes o If 2 or more codes are same/similar without citations, we (the graders) reserve the right to question and/or assign zero to either/all parties involved o You may talk/discuss but NOT SHOW If copied code via online, cite the link to not get penalized . Read the assignment thoroughly

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

When if ever should a government privatize a service?

Answered: 1 week ago

Question

GENERAL MANAGEMENT IN BUSINESS?

Answered: 1 week ago

Question

WHAT IS ACCOUNTING AND FUNCTIONS?

Answered: 1 week ago

Question

Breathing explain?

Answered: 1 week ago