Question: Hey! I need help with (Code HS: 2.14.5 Amusement Park) public class Amusement Park extends Console Program { } int AGE LIMIT = 12; int

Hey!

I need help with (Code HS: 2.14.5 Amusement Park)

public class Amusement Park extends Console Program { } int AGE LIMIT= 12; int HEIGHT_LIMIT = 48; public void run() { int age

public class Amusement Park extends Console Program { } int AGE LIMIT = 12; int HEIGHT_LIMIT = 48; public void run() { int age read Int("Enter your age: "); int height = readInt("Enter your height in inches: "); boolean oldEnough age >= AGE_LIMIT; boolean tallEnough = height >= HEIGHT_LIMIT; // CHANGE THIS LINE // Convert this boolean expression into its De Morgan equivalent boolean cannotRide = (oldEnough && tallEnough); if(cannotRide) { } else { } System.out.println("You may not ride the rollercoasters."); System.out.println ("You may ride the rollercoasters!"); boolean canSwim = readBoolean("Can you swim? "); boolean hasLifeJacket = readBoolean ("Do you have a life jacket? "); // CHANGE THIS LINE // Convert this boolean expression into its De Morgan equivalent boolean cannot Swim !(canSwim || hasLifeJacket); if (cannotSwim) { } System.out.println("You may not swim in the pool."); } else { System.out.println("You may swim in the pool!");

Step by Step Solution

3.48 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the modified expressions using De Morgans Laws boolean cannotRide oldEnough tallEnough bool... View full answer

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 Programming Questions!