import java.util.*;
public class Kadai1002{
public static void main
(String[] args
){ Scanner scan
= new Scanner
(System.
in);
System.
out.
println("**1つ目のプラン指定(基本)**");
System.
out.
print("プラン名 --> ");
System.
out.
print("基本料金 --> "); int kihon = scan.nextInt();
System.
out.
print("無料通話分 --> "); int muryo = scan.nextInt();
System.
out.
print("1分当たりの通話料金 --> "); int call = scan.nextInt();
System.
out.
print("100パケット当たりのパケット料金 --> "); int packet = scan.nextInt();
BasicPlan bp1 = new BasicPlan(name,kihon,muryo,call,packet);
System.
out.
println("\n**2つ目のプラン指定(基本)**");
System.
out.
print("プラン名 --> "); name = scan.next();
System.
out.
print("基本料金 --> "); kihon = scan.nextInt();
System.
out.
print("無料通話分 --> "); muryo = scan.nextInt();
System.
out.
print("1分当たりの通話料金 --> "); call = scan.nextInt();
System.
out.
print("100パケット当たりのパケット料金 --> "); packet = scan.nextInt();
BasicPlan bp2 = new BasicPlan(name,kihon,muryo,call,packet);
System.
out.
println("\n**3つ目のプラン指定(サービス)**");
System.
out.
print("プラン名 --> "); name = scan.next();
System.
out.
print("基本料金 --> "); kihon = scan.nextInt();
System.
out.
print("サービス料金 --> "); int service = scan.nextInt();
System.
out.
print("無料通話分 --> "); muryo = scan.nextInt();
System.
out.
print("1分当たりの通話料金 --> "); call = scan.nextInt();
System.
out.
print("100パケット当たりのパケット料金 --> "); packet = scan.nextInt();
ServicePlan sp3 = new ServicePlan(name,kihon,service,muryo,call,packet);
System.
out.
println("** 利用料金のシュミレーション **");
System.
out.
print("通話時間(分) --> "); int ct = scan.nextInt();
System.
out.
print("パケット数 --> "); int pake = scan.nextInt();
System.
out.
println(bp1.
getName() + "の場合の料金 : " + /* ??? */); System.
out.
println(bp2.
getName() + "の場合の料金 : " + /* ??? */); System.
out.
println(sp3.
getName() + "の場合の料金 : " + /* ??? */);
}
}
aW1wb3J0IGphdmEudXRpbC4qOwoKcHVibGljIGNsYXNzIEthZGFpMTAwMnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYW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