摘要: 1 package com.oop.inhert; 2 3 public class Student { 4 private int id; 5 private String name; 6 private int age; 7 8 public Student() {} 9 10 public Student(in... 阅读全文
posted @ 2018-12-04 23:00 从零开始-白 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1 package com.szxs.pet; 2 /** 3 * 宠物类 4 * @author 5 * 6 */ 7 public class Pet { 8 private String name; //姓名 9 private int health; //健康值 10 private int love; //亲密度 11 ... 阅读全文
posted @ 2018-12-04 22:54 从零开始-白 阅读(1158) 评论(0) 推荐(0) 编辑
摘要: 1 package com.szxs.pet; 2 3 /** 4 * 宠物类 5 */ 6 public abstract class Pet { 7 private int health; 8 9 public int getHealth() { 10 return health; 11 } 12 13 publ... 阅读全文
posted @ 2018-12-04 22:29 从零开始-白 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 1 package com.szxs.goods; 2 /** 3 * 父类:商品类 4 * @author 5 * 6 */ 7 public abstract class Goods { 8 public abstract void printPrice(); 9 } 1 package com.szxs.goods; 2 3 //食品类 4 public c... 阅读全文
posted @ 2018-12-04 22:22 从零开始-白 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 1 package com.ketang.print; 2 3 /** 4 * 纸张接口 5 * @author 6 * 7 */ 8 public interface Paper { 9 String getSize(); 10 } 1 package com.ketang.print; 2 3 /** 4 * A4纸张 5 * @au... 阅读全文
posted @ 2018-12-04 22:06 从零开始-白 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 1 package com.ketang.phone; 2 3 /** 4 * 父类:手机类 5 * @author 6 * 7 */ 8 public abstract class Phone { 9 private String brand; //品牌 10 private String type; //型号 11 12 publi... 阅读全文
posted @ 2018-12-04 21:54 从零开始-白 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1 package com.ketang.door; 2 3 /** 4 * 门类 5 * @author 6 * 7 */ 8 public abstract class Door { 9 10 //开门 11 public void open() { 12 System.out.println("用力推,门开了。。。"... 阅读全文
posted @ 2018-12-04 21:47 从零开始-白 阅读(895) 评论(0) 推荐(0) 编辑
摘要: 要求:实现显卡、声卡、网卡通过PCI插槽工作 阅读全文
posted @ 2018-12-04 21:35 从零开始-白 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 1 package com.kehou.Animal; 2 3 /** 4 * 父类:动物类 5 * @author 6 * 7 */ 8 public abstract class Animal { 9 10 private String name; 11 12 13 14 public Animal() { 15 ... 阅读全文
posted @ 2018-12-04 21:22 从零开始-白 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 package demo2; 2 3 import java.util.InputMismatchException; 4 import java.util.Scanner; 5 6 /** 7 * 根据编号输出课程名称,输入错误处理异常并提示 8 * @author 9 * 10 */ 11 public class Course { 12 publ... 阅读全文
posted @ 2018-12-04 21:16 从零开始-白 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1 package com.kehou.print; 2 3 /** 4 * 父类:打印机类 5 * @author 6 * 7 */ 8 public abstract class Printer { 9 public abstract void print(); 10 } 1 package com.kehou.print; 2 3 /** ... 阅读全文
posted @ 2018-12-04 21:14 从零开始-白 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 题目要求:对年龄赋值进行判断,不在1-100抛出异常并处理 阅读全文
posted @ 2018-12-04 21:09 从零开始-白 阅读(127) 评论(0) 推荐(0) 编辑