Question
. If the age is greater and equal to 35, print: able to do anything and on next line print: (How happy!) Write a
. If the age is greater and equal to 35, print: "able to do anything" and on next line print: "(How happy!)" Write a class called AgeMessages, which does the following: Ask the user to enter age using a Scanner If the age is less than 13, print: "too young to create a Facebook account" If the age is less than 16, print: "too young to get a driver's license" If the age is less than 18, print: "too young to get a tattoo" If the age is less than 21, print: "too young to drink alcohol" If the age is less than 35, print: "too young to run for President of the U.S." and on next line print: "(How sad!)" Tip Use an if statement Think of what statements would need curly brackets { }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres the Java code for the AgeMessages class import javautilScanner public class AgeMessages public ...Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started