最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Java基础案例3-3:多功能手机

IT圈 admin 95浏览 0评论

2024年2月14日发(作者:守明轩)

public void downloadMusic() { n(""); n(""); } public void playMusic(String song) { n("正在播放:" + song); } public String getBrand() { return brand; } public void setBrand(String brand) { = brand; } public String getType() { return type; } public void setType(String type) { = type; } public String getOs() { return os; } public void setOs(String os) { = os; } public double getPrice() { return price; } public void setPrice(double price) { = price; } public int getMemory() { return memory; } public void setMemory(int memory) { = memory; }}

/* */package

public class PhoneTest { public static void main(String[] args) { Phone p1 = new Phone(); nd("Apple"); e("iPhone Xs"); ("ios"); ory(256); ce(8999); (); ("1"); sic("Hey Judy"); me(); n("======================"); Phone p2 = new Phone("Huawei", "Huawei P50", "HarmonyOs", 10099, 128); (); ("3"); me(); sic("好运来"); }};

2024年2月14日发(作者:守明轩)

public void downloadMusic() { n(""); n(""); } public void playMusic(String song) { n("正在播放:" + song); } public String getBrand() { return brand; } public void setBrand(String brand) { = brand; } public String getType() { return type; } public void setType(String type) { = type; } public String getOs() { return os; } public void setOs(String os) { = os; } public double getPrice() { return price; } public void setPrice(double price) { = price; } public int getMemory() { return memory; } public void setMemory(int memory) { = memory; }}

/* */package

public class PhoneTest { public static void main(String[] args) { Phone p1 = new Phone(); nd("Apple"); e("iPhone Xs"); ("ios"); ory(256); ce(8999); (); ("1"); sic("Hey Judy"); me(); n("======================"); Phone p2 = new Phone("Huawei", "Huawei P50", "HarmonyOs", 10099, 128); (); ("3"); me(); sic("好运来"); }};

发布评论

评论列表 (0)

  1. 暂无评论