Question: Project 6 - Server Operating Costs Note: When you turn in an assignment to be graded in this class, you are making the claim that
Project Server Operating Costs
Note: When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in except of course, assistance from the instructor or teaching assistants
Virtual Cloud Unlimited VCU is a cloud computing startup that manages data centers to sell to other companies. You will create an abstraction that will help VCU compare the operating costs of different servers that VCU might build for their data centers.
We do not specify the creation of any helper methods, but consider the following:
The UMLs below only show the required methods, feel free to create any private helper methods to help you do this. Take inspiration from previous projects for ideas for helper methods
For your main program, again, consider making helper methods instead of dumping everything in the main method
However, DO NOT create any new files. All helper methods should be contained in one of the files specified in this project spec.
Abstraction Structure
Since there are different types of models for operating and maintaining a server, we will have an abstract class named Server.java. The characteristics that define a server are included in the UML further down
The operating cost of a server depends on the purchase method of a server. So the getOperatingCost method will be abstract and implemented based on the type of server. Please note that all other server methods will be concrete and implemented within the server class. Additionally there will be a static variable called compareNumYears which will be used to compare the cost of different servers when implementing comparable covered later in the specification The compareNumYears static variable should be given an initial value of
There are different types of server purchase methods that will affect the operating cost of a server, Rental, Owned, and Financed. Rental servers have an annual cost associated with them, but no maintenance or labor fees associated with the server, since the company owning the servers will maintain them as part of their annual cost. Owned servers have no annual cost, but have a base cost and require an amount of maintenance, as well as a cost factor based on the failure rate of the hardware. Financed servers are similar to owned servers, but have annual loan payments for the duration of the loan, after which, their cost is the same as an owned server. In your program you should create RentalServer.java and OwnedServer.java which will both extend the Server class, and you will have FinancedServer.java, which will extend OwnedServer.java.
Note: an underlined property is a static property. An italicized method is abstract The UML describing this is below:
uparrow Be mindful of units when creating java docs. The failure rate is a chance of failure per year. The apr should be between and not a percentage. The maintenance costs, annual rent, and base costs should be in US dollars.
All getter and setter methods should be implemented as normal. Note that the getter and setter for compareNumYears will be slightly different since you are modifying a static variable.
Calculating Operating Costs
In all cases, the getOperatingCosts method will take a number of years as its parameter. The descriptions for the operating costs are below
Rental servers
operatingCost annualRent numYears
Owned servers
operatingCost baseCost failureRate numYears maintenanceCosts
Financed server
For the initial term of the loan for a financed server the loanTerm variable, in years the operating cost is the following formula
operatingCost baseCost apr numYears fractext baseCost text loanTerm numYears failureRate numYears maintenanceCosts
If the given number of years is larger than the loanTerm, the formula for calculating operating cost becomes the following instead
operatingCost baseCost apr loanTerm baseCost failureRate
numYear maintenanceCosts
Note that this is a simplification of the operatingCost calculation added to the owned server operating cost calculation
Implementing Comparable
Once you've implemented the above classes, your Server class should implement the Comparable interface. You should use the static variable compareNumYears with the getOperatingCost method to implement Comparable so that all Servers are being compared on the same timeframe. Since comparable only takes an argument of other, all servers need to be compared on the same timeframe; this is accomplished by using the common compareNumYears static variable since it belongs to all servers, and not an individual server Your implementation of compareNumYears can use Double.compareDouble other to make life easier for yourself as the comparison is not too complex.
The main program
The main program AnalyzeOperatingCosts.java will take three the third will be a number of years to compare operating costs over.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
