public Parcel(double weight) { this.weight = weight; } public double CalculateFee(double distance)... namespace 택배_요금_계산_시뮬레이션 class Application { #region 단일체 패턴 static...
this, calculateFee(audienceCount), audienceCount); } calculateFee라는 메서드는 요금을 계산하기... valueOf(amount)) } public static Money wons(double amount){ return new Money(BigDecimal.valueOf(amount)) } public...
public class Parking { //주차 요금을 계산하는 메소드 public static double Pay(double Ptime) { double Parkpay; if(Ptime>0 && Ptime<1) return 2000.0; else if(Ptime>1){ Parkpay=(2000.0+(((int)...
times(taxRate)); } } public class NightlyDiscountPhone { private static final int LATE_LIGHT_HOUR = 22; private... public Phone(double taxRate) { this.taxRate = taxRate; } public Money calculateFee() { Money result = Money....
-
public Parking(String name, int pDate, int pTime, int oDate, int oTime) { customerName... 6.15 public class Hypotenuse { public static double Hypotenuse(double a, double b) { return Math....
static double stime, etime, ptime; 전역변수 선언 void CMainFrame::SetSimulationTime(int paraStatus) { tm t; CString strSTime; _getsystime(&t); strSTime.Format("%02d-%02d-%02d %02d: %02d...
... public class CalParkingFee { public static double calculateFee(double ptime) { double fee = 0; return fee; } public static void main(String[] args) { double entrytime; double exittime; double fee; String flag; Scanner scan...
... public class RecordTest { public static void main(String[] args) throws Exception { ArrayList players = new... { double pTime = ((Player)o).getTime(); if( pTime == this.time ) return 0; else if( pTime < this.time )...
... long when() const{return arrive;} int ptime() const{return processtime;}... newcustomer(double x) { if(rand() * x/RAND_MAX < 1) return true; else return false; } static int num=0; Queue* queue_check(Queue& a,Queue& b) { if...
... (calculateFee) // @입력 매개변수들: // ptime - 주차시간 // @되돌려주는 값: 주차요금 // 여기에 코드를 삽입하세요 public static double calculateFee(double ptime) { double fee = 0; return fee; } public static void main(String[] args)...
... public class CalParkingFee { public static double calculateFee(double ptime) { double fee = 0; return fee; } public static void main(String[] args) { double entrytime; double exittime; double fee; String flag; Scanner scan...
... // @입력 매개변수들: // ptime ? 주차시간 // @되돌려주는 값: 주차요금 // 여기에 코드를 삽입하세요 static double accounts(double entryTime, double outTime) throws Exception { double charge = 1000.0; double chargeNext...