subject

Use Java please! class Mascara
Our Mascara class will include the following:
-forShortLashes: boolean
-forThinLashes: boolean
-forStraightLashes: boolean
-waterProof: boolean
-brand: String
+Mascara(String, boolean, boolean, boolean, boolean)
+setInfo(boolean, boolean, boolean, boolean): void
+getBrandName(): String
+isForShortLashes(): boolean
+isForThinLashes(): boolean
+isForStraightLashes(): boolean
+isWaterProof(): boolean
+getInfo(): String
+toString(): String
• Constructor: brand is used to uniquely identify a mascara brand, while the remaining parameters all
represent different uses of a mascara: if forShortLashes is true, the mascara is best for short lashes; if
forThinLashes is true, the mascara is best for thin lashes; if forStraightLashes is true, the mascara is best for
straight lashes; if waterProof is true, the mascara is water proof.
• A void method called setInfo for setting the information after object creation with the parameter list:
boolean forShortLashes, boolean forThinLashes, boolean forStraightLashes, boolean waterProof.
• A getter called getBrandName for the brand. We do not need a setter because we do not expect to change
the brand after it is set.
• Methods isForShortLashes(), isForThinLashes(), isForStraightLashes(), isWaterProof(), each of which
take no parameters and return boolean. These methods indicate which lash types the mascara is good for.
These might be redefined in subclasses, but for now, each of these methods should return whatever the boolean
attributes were set to.
• A getInfo method that takes no parameters and returns a String containing each of the features of the
mascara separated by spaces. For example, if isForShortLashes() is true only, the string will return: Short
Lashes. If isForShortLashes() and isForThinLashes() is true, the string returned is: Short Lashes Thin Lashes.
If all of them are true, the string will return: Short Lashes Thin Lashes Straight Lashes +Water Proof {may
clump during application, require more time to dry}
*As you can see if isWaterProof() is true, the string is a little longer. Pay attention to the exact string returned.
If none of them return true, the empty string should be returned ("").
NOTE: in order for this method to work correctly for subclasses, you should use the previously defined
isForShortLashes(), isForThinLashes(), isForStraightLashes(), isWaterProof() methods rather than access any
data members directly.
• A toString method which returns a String in the format "Brand: , Good For: "
(replacing with actual brand and list of features).

class VolumizingMascara
Our VolumizingMascara class will include the following:
+VolumizingMascara(String, boolean)
+isForShortLashes(): boolean
+isForThinLashes(): boolean
+isForStraightLashes(): boolean
• Extend the Mascara class.
• An overloaded constructor with just two parameters: String brand, boolean waterProof
• An overridden isForShortLashes() method which always returns false.
• An overridden isForThinLashes() method which always returns true;
• An overridden isForStraightLashes() method which always returns false;
NOTE: this class does not define or override the getInfo method, but it is still inherited by this subclass, and
it should still give the correct output when on instances of this subclass. If you've followed the note above,
this will be the case.

class LengtheningMascara
Our LengtheningMascara class will include the following:
+LengtheningMascara(String, boolean)
+needsMultipleCoats(): boolean
+isForShortLashes(): boolean
+isForThinLashes(): boolean
+isForStraightLashes(): boolean
+getInfo(): String
• Extend the Mascara class.
• An overloaded constructor with just two parameters: String brand, boolean waterProof
• A new method, needsMultipleCoats() which takes no arguments and returns true.
• An overridden isForShortLashes() method which always returns true.
• An overridden isForThinLashes() method which always returns false;
• An overridden isForStraightLashes() method which always returns false;
• An overridden getInfo method which returns a string in the same format as the parent class Mascara
but with the additional +Needs Multiple Coats at the end.
Please solve these first 3 classes. There's 3 more which I'll post in a separate question and will put it in the comments. Comments in code is appreciated.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
Gerard is currently working as an entry-level customer support technician, but he would like to someday become a software developer. what is the best first step to understand what he should do? ask his manager for a new job or at least a job recommendation study graphic design in order to obtain the necessary skills use career resources to investigate what skills and education are required work part-time as an entry-level web developer question 13 (true/false worth 6 points) (08.03 lc) career resources are used to explore career options and find career information. true false question 14(multiple choice worth 6 points) (08.01 mc) classify the following skills: writing html code, evaluating color theory, using design principles. hard skills interpersonal skills people skills soft skills question 15 (true/false worth 6 points) (08.03 lc) a mentor is a person who is advised, trained, or counseled by a trusted mentee. true false
Answers: 2
question
Computers and Technology, 22.06.2019 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
You know the right answer?
Use Java please! class Mascara
Our Mascara class will include the following:
-forShortL...
Questions
question
Mathematics, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01
question
Mathematics, 20.09.2020 02:01