Question
bever. class 1. 1 instance attributes: nane, bype (valid values are juice*, soda*, *flavored water*, sports,etc.), ounces (a number with no decimals) and decarbonated 2.2
bever. class 1. 1 instance attributes: nane, bype (valid values are "juice*, "soda*, *flavored water*, "sports",etc.), ounces (a number with no decimals) and decarbonated 2.2 Constructors: A4 parameter constructor thossesinounces, Thal Eype a 3. Write getters and setters for all 4 instance attributes isthe cat his atom methods a, publie boolean ouncesEndswith6 12 returns a false. 116 returns a true, HiNT: the modulo operator helps herellf the method determines it the type begins with a specific set of characters, case sensitive, that are passed as a parameti or. For example: The type soda returns true for a aex of so, but it relurns false for astrol so or ev. S. Write a readable and neat tostring () . Output will have all 4 instance attributes and it will invoke the ends ethod, Label your output appropriates. Beverage 1. Create at leas objects and dace then in an array list inure thut vou use both constructors and that your data will test your methods wii. Output a lo mumum number of ounces. Print out the beveraze name and the numbe ounces, label your out ou 3. Using the two last beverages you created, test your rare a innie, method. Lab I your outpu so it is e38 y 4. White 3 logo th wetares the ounces in all of your beverares. In Terclare mil Pain a decimal. label your outout so that the -sess easydeolairo
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