a) Create a class named blanket with fields for a blanket’s size, color, material, and price. The default constructor sets the values to Twin, White, Cotton, $30. Write another constructor as well to get the values of the first three fields and CALCULATES the price. The base price is $30. Add $10 to the base price for a double blanket, $25 for a queen blanket, and $40 for a king blanket. Also, add $20 for a wool blanket, and $45 for cashmere. In other words, a king-size cashmere blanket costs $115 ($30 + $40 + $45) while a double wool blanket costs $ 60 ($30 + $10 + $20). Write a method to display all four fields nicely on the screen. Call your code “[login to view URL]”
b) Create a child class named ElectricBlanket that extends Blanket and includes two additional fields: one for the number of heat settings, and one for whether it has an automatic shut-off. The default values are 1 and false. Write a default constructor and a user-entered constructor. Add $% to the price of the blanket if the does not have automatic shut-off and $10 if it does. Write a method to display all six fields nicely on the screen. Call your code “[login to view URL]”
c) Create an application to create two objects of “Blanket” and two objects of “ElectricBlanket” and display their data. Call your code “[login to view URL]”
97 威客就此工作平均出价 $19/小时
Hi! I'm interesting your project very well. I am a full time devloper. I am good at Java and I'm a good Algorithmer. I have good experience about JavaFx and OOP. Let's go ahead with me
Hi There, I am an expert and Java and develop and create classes and application as mentioned in project description . I will charge you total $40 for this. Please let me know. Thanks, Shatrughna
Hi! I can write these classes and the code to use them as you requested, and it will be done in about an hour. I can start now, so because I am fast you will be paying around $25 for a fast and accurate work
Hello, I am interested in this project and so wanted to discuss more it in details. I have a lot of experience in Java programming. I will provide you quality work according to your instrument. Thank you.