Question: I have this assignments. It needs to be true or false for it. Ive included the output at the bottom. Any helps would be appreciated.

I have this assignments. It needs to be true or false for it. Ive included the output at the bottom. Any helps would be appreciated.  I have this assignments. It needs to be true or false
for it. Ive included the output at the bottom. Any helps would
be appreciated. Requirements Name your file ConditionsFL.java 1. Data Input .Using Scanner,

Requirements Name your file ConditionsFL.java 1. Data Input .Using Scanner, prompt the user for the following 3 items of input data: davnumber: 1=Monday up to 7-Sunday [int] time of day: either afternoon or evening, only 2 possible values, so: boolean] o For automated testing, must use: afternoon-false, evening-true o patron age: 0 on upward [int] *For now, you can assume that all data is entered properly, so no error checking needed Make sure your prompts are very clear and specific about what is requested. 2. Computations: * See the ticket pricing matrix on the prior page. .Each of the 5 colored ticket rates is to be declared as a single boolean variable, and implemented as one conditional expression. You need to come up with the 5 required conditional expressions, using any available conditional and logical operators. Your 3 available pieces of data for comparisons are the above 3 inputs. The rates are all mutually exclusive, so only one can be true and the other 4 must be false o o o 3. Outputs: .Include some sort of program header in your output. See the sample output. .Print the values of all 5 of the conditional variables, only ONE of which should be true. o To expedite testing, must order the 5 rates as shown in the sample output. .Include text for what each rate represents, in your output format. .Your output labeling text may differ, but should resemble the sample output given. Suggested Implementation Declare the needed data first: 3 inputs and 5 ticket price conditional booleans. Set up the program shell: a program header, 3 input prompts, and the ordered 5 output labels. Just hardwire some conditional outputs for now, start by displaying them in the indicated order Step back and consider the "big picture". There are multiple ways of implementing the needed conditional statements. Use an approach that makes sense to you, and look for ways to simplify the needed logic . KEY IDEA: You don't have to compute the rates in orderl Look for patterns in the ticket pricing and handle the largest contiguous areas first, then address the exception regions. o Find the simplest ticket price expression(s) and write those conditional expressions. o Express the later ticket price expressions using earlier expressions: rate3,etc. o SUGGESTED RATES ORDER: (discount, seniors, full price, no charge, kids rate) "Frame" your conditions first. Set up all the (empty) nested parens, and then fill in the contents. This is much easier that balancing open/closed parens later! Use parens liberally upfront. Test your conditions adequately. Run all 20 provided sample cases, and check your outputs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!