Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In chemistry, the pH scale is used to describe the acidity of a solution. Create a class called Aqueous Solution with one data field: the

image text in transcribed

In chemistry, the pH scale is used to describe the acidity of a solution. Create a class called Aqueous Solution with one data field: the numeric pH level of the solution. Include a constructor that accepts the pH level, as well as get and set methods. It should also have a method called getDescription that returns "Acid," "Base", or "Neutral" based on the field. A pH level of 7 is neutral; higher than 7 is a base, while lower than 7 is an acid. Next, create a program called PHDemo that prompts the user to enter a pH level, then uses that input to create an Aqueous Solution object and then output the description using the object's getDescription method. Note: all user input/output (Scanner use, System.out.println, etc) should be handled in PHDemo, not Aqueous Solution

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_2

Step: 3

blur-text-image_3

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

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

What steps should be taken to address any undesirable phenomena?

Answered: 1 week ago