Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have completed CloudStorage and DedicatedCloud.java. Can anyone finish the rest? please contact me public abstract class CloudStorage { private static int count; protected String

I have completed CloudStorage and DedicatedCloud.java. Can anyone finish the rest?

please contact me

public abstract class CloudStorage {

private static int count;

protected String cloudName;

protected double BaseStorageCost;

CloudStorage() {

count++;

}

CloudStorage(String nm, double bsc) {

this.cloudName = nm;

this.BaseStorageCost = bsc;

}

// end param constrctor CloudStorage

String getName(){

return this.cloudName;

}

void setName(String nm) {

this.cloudName = nm;

}

double getBaseStorageCost(){

return this.BaseStorageCost;

}

void setBaseStorageCost(double bsc) {

this.BaseStorageCost = bsc;

}

static int getCount() {

return count;

}

static void resetCount(){

count = 0;

}

public String toString() {

String output = getName() + " (" + getClass() + ") "

+ "Monthly Cost: $ " + MonthlyCost();

output += " " + "Base Storage Cost: $" + getBaseStorageCost();

return output;

}

public abstract doubleMonthlyCost();

}

import java.text.DecimalFormat;

public class DedicatedCloud extends CloudStorage {

private double ServerCost;

/***

* @param nm gets name.

* @param bsc gets BaseStorageCost.

* @param ServerCostIn gets cost for sercers.

*/

public DedicatedCloud(String nm, double bsc, double ServerCostIn) {

super(nm, bsc);

this.ServerCost = ServerCostIn;

}

/**

* @return the ServerCost

*/

public double getServerCost() {

return ServerCost;

}

/**

* @param ServerCost

* the ServerCost to set

*/

public void setServerCost(double ServerCostIn) {

this.ServerCost = ServerCost;

}

public double MonthlyCost() {

double MonthlyCost = ServerCost + BaseStorageCost;

return MonthlyCost;

}

public String toString() {

DecimalFormat fmt = new DecimalFormat("$#,##0.00");

String output;

output = super.toString()

+ " Server Cost: " + fmt.format(getServerCost());

return output;

}

}

image text in transcribed
Project: Chud Storage - Part 1 Toject: Cloud Storage - Part ) mject: Cloud Storage -Part 1 Project: Cloud Storage - Part 1 Project: Cloud Storage - Part roject: Cloud Storage - Part 1 Project: Cloud Storage - Part 1 "roject: Cloud Storage - Part ) Projects Cloud Storage

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

=+a. What are the United States' five largest trading partners?

Answered: 1 week ago