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 08:00
What best describes a career pathway in a lodging career? a worker starts out as an amusement attendant, then becomes a recreation worker, and then becomes a gaming worker within five years. a worker starts out as a bell hop, then becomes a night clerk, and then becomes a hotel manager within five years. a worker starting out as a tour guide, then becomes a travel clerk, and then becomes a travel agent within five years. a worker starts out as a server, then becomes a food preparer, and then becomes a head chef within five years.
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
You know the right answer?
Use Java please! class Mascara
Our Mascara class will include the following:
-forShortL...
Questions
question
Mathematics, 03.02.2021 01:00
question
Mathematics, 03.02.2021 01:00
Questions on the website: 13722361