Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Anna Ivashkevich CISY 105 Project 2 Overview A Landscaper has two Service Levels for landscaping: S=Standard and P=Premium. The costs are calculated differently:  The cost of the Standard Service...

2 answer below »
Anna Ivashkevich
CISY 105
Project 2
Overview
A Landscaper has two Service Levels for landscaping: S=Standard and P=Premium. The costs are calculated differently:
 The cost of the Standard Service Level( S ) is $9,865.34 per acre(prorated).
Example: at the Standard Service Level, a 1.5 acre lot is 1.5*9,865.34 = $14,798.01
 The cost of the Premium Service Level( P ) is $15, XXXXXXXXXXprorated) for up to an acre. When a lot is over an acre the price is $15,975.75 for the first acre and $21,999.98 per acre (prorated) beyond 1.
Example: at the Premium Service Level, a 1.5 acre lot is XXXXXXXXXX*$15, XXXXXXXXXX*$21,999.98 = $26,975.74
Technical Overview
For this Project you will be writing the class LandscapingService in a LandscapingService.java file per the UML and descriptions. To test the class, you will use a test program provided by the instructor:
LandscapingServiceDemoLoop.java which is in Lion’s Den. NOTE: You do NOT change this module…. it works so your class must fit with this main!
LandscapingService
    LandscapingService
    -serviceLevel : cha
-acreage : double
    + LandscapingService ( newServiceLevel : char, newAcreage: double )
+getAcreage( ) : double
+getServiceLevel( ):cha
+setAcreage( newAcreage: double ) : void
+setServiceLevel( newServiceLevel : char ) : void
+cost( ) : double
+toString( ) : String
The class LandscapingService has two attributes(fields): serviceLevel [ a char ] and acreage [ a double ].
The LandscapingService should have the following:
 Two fields, serviceLevel a char and acreage a double
 Constructor which receives a char for the service level, and a double for acreage
 Getters: getAcreage( ),and getServiceLevel( )
· Setters: setAcreage( ),and setServiceLevel( )
 cost( ) will calculate the cost based on service level and acreage - (note the numbers XXXXXXXXXXand the XXXXXXXXXXand the XXXXXXXXXXcan be hardcoded in the formulas as opposed to using constants)
 toString( ) that returns a string with serviceLevel, acreage, and cost( )
[ Note: tester does not use toString() ]
Tester Program:
On Canvas there is a tester, LandscapingServiceDemoLoop.java. It will instantiate/change an object and compare the cost returned to an expected value.
Sample Output from LandscapingServiceDemoLoop.java
[S,0.25] Level S Acr.: 0.25 Exp: 2, XXXXXXXXXXAc: 2,466.34
[S,1.00] Level S Acr.: 1.00 Exp: 9, XXXXXXXXXXAc: 9,865.34
[S,1.25] Level S Acr.: 1.25 Exp: 12, XXXXXXXXXXAc: 12,331.68
[S,1.50] Level S Acr.: 1.50 Exp: 14, XXXXXXXXXXAc: 14,798.01
[P,0.25] Level P Acr.: 0.25 Exp: 3, XXXXXXXXXXAc: 3,993.94
[P,1.00] Level P Acr.: 1.00 Exp: 15, XXXXXXXXXXAc: 15,975.75
[P,1.25] Level P Acr.: 1.25 Exp: 21, XXXXXXXXXXAc: 21,475.75
[P,1.50] Level P Acr.: 1.50 Exp: 26, XXXXXXXXXXAc: 26,975.74
Grading Ru
ic:
LandscapingService class
 comment in code up top with name (2 points)
 Two fields, serviceLevel a char and acreage a double (4 points)
 Constructor that receives 2 parameters (6 points)
 2 getters (5 points each for a total of 10 points)
 2 Setters (7 points each for a total of 14 points)
 cost( ) method (20 points)
 toString( ) method (10 points)
 Javadoc comments for constructor, setters, getters, cost() and toString() methods (21 points)
 following convention for class names and variable names (5 points)
 indenting (8 points)
 -3 points if it doesn’t compile and -1 point for each syntax e
or
Late and Cheating Policies
See the syllabus for the Late Policy (-10pts day) and the Cheating Policy (don’t cheat)
Submitting the Project
Submit LandscapingService.java on Canvas.
Answered Same Day Mar 25, 2021

Solution

Aditi answered on Mar 25 2021
138 Votes
Solution/LandscapingService.java
Solution/LandscapingService.java
public class LandscapingService {
    
    char serviceLevel;
    double acreage;
    public LandscapingService(char newServiceLevel, double newAcreage) {
        this.serviceLevel = newServiceLevel;
        this.acreage = newAcreage;
    }
    public double getAcreage() {
        r...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here