Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. If the age is greater and equal to 35, print: able to do anything and on next line print: (How happy!) Write a

image text in transcribed

. 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 ... blur-text-image

Get Instant Access with AI-Powered 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

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

Find the intervals of increasing and decreasing for: f(x) = x4-2x3

Answered: 1 week ago