Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored 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