Question
Please code this in JAVA . There's a first part of this question which you might need to see for background info. These are the
Please code this in JAVA. There's a first part of this question which you might need to see for background info. These are the last 3 classes. The first 3 classes are provided in this separate question HERE: https://www.chegg.com/homework-help/questions-and-answers/use-java-please-class-mascara-mascara-class-include-following-forshortlashes-boolean-forth-q69875149?trackid=_t0Syq7-
class CurlingMascara
Our CurlingMascara class will include the following:
#specialApplicator: String
+CurlingMascara(String, boolean, String)
+CurlingMascara(String, boolean)
+needsSpecialApplicator(): boolean
+getInfo(): String
+toString(): String
Extend the Mascara class.
An overloaded constructor with the parameters String brand, boolean waterProof, String
specialApplicator. Notice the symbol used in the UML diagram for the attribute accessor specifier.
Note: you can use the parent class' constructor to set the other capabilities first, and then set the
passed in arguments. forShortLashes should always be false, forThinLashes should always be false,
forStraightLashes should always be true.
An overloaded two argument constructor for String brand, boolean waterProof, which by default sets
the specialApplicator to null. Note: if you followed the previous note, you can chain constructors to
accomplish this in one line.
Add a new method, needsSpecialApplicator() which takes no arguments and returns true if the
CurlingMascara has a non-null attribute specialApplicator, otherwise false.
An overridden getInfo method which returns a string in the same format as the parent class Mascara,
but with the additional requires special applicator at the end (if true): +Requires Special Applicator.
An overridden toString method which returns a string in the same format as the parent class Mascara
and if the Mascara needs a special applicator, appends a space followed by the specialApplicator
surrounded by quotation marks. Example: Brand: SomeBrand, Good For: Straight Lashes +Water
Proof {may clump during application, require more time to dry} +Requires Special Applicator:
"curved wand". (If the mascara does not need a special applicator, nothing should be appended).
------------------------------------------------------------------------------------------------------------------------------------------
class FiberMascara
Our FiberMascara class will include the following:
+FiberMascara(String, boolean)
+doubleStacked(): boolean
+getInfo(): String
Extend the LengtheningMascara class.
An overloaded constructor with just two parameters: String brand, boolean waterProof
A new method, doubleStacked() which takes no arguments and returns true.
An overridden getInfo method which returns a string in the same format as the parent class
LengtheningMascara but with the additional +Double Stacked {Mascara + Nylon Lash Fibers} at the
end.
--------------------------------------------------------------------------------------------------------------------------------------------------
class MascaraList
Our MascaraList class will include the following:
+??
+addMascara(Mascara): void
+toString(): String
Composition with an array of Mascara objects.
UML is vague on purpose. You need to figure out what parameters and methods to include;
however, the class must include: void addMascara(Mascara) which adds Mascara objects to an array
and String toString() which prints all the mascara in the array in this format, example:
1. Brand: Marc Jacobs Velvet Noir, Good For: Short Lashes Thin Lashes Straight Lashes +Water Proof {may
clump during application, require more time to dry}
2. Brand: Pat McGrath Labs, Good For: Thin Lashes +Water Proof {may clump during application, require
more time to dry}
3. Brand: E.L.F, Good For: Short Lashes +Needs Multiple Coats
4. Brand: Maybelline Lash Discovery, Good For: Straight Lashes +Water Proof {may clump during
application, require more time to dry}
5. Brand: Benefit, Good For: Straight Lashes +Water Proof {may clump during application, require more time
to dry} +Requires Special Applicator: "curved wand"
6. Brand: LOreal Paris Double Extended Beauty, Good For:
7. Brand: NYX Professional Makeup, Good For: Short Lashes +Water Proof {may clump during application,
require more time to dry} +Needs Multiple Coats +Double Stacked {Mascara + Nylon Lash Fibers}
Please help solve this 3 classes using the background info from the other 3 classes posted in a separate question, link is at the top. Comments in code are appreciated. Thank you!
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