Java_洪泽海_1104_homework

package november_4th;

 

public class Grade {
private int number;
private String name;

public Grade(){}
public Grade(int number,String name){
    this.number = number;
    this.name = name;
}
public int getNumber() {
    return number;
}
public void setNumber(int number) {
    this.number = number;
}
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}

}


public class Student {
private int number;
private int ID;
private String name;
private int age;
private String sex;
private String address;
private int phone;
private String Email;

public Student(){}
public Student(int number,int ID,String name){
    this.number = number;
    this.ID = ID;
    this.name = name;
}
public Student(int number,int ID,String name,int age,String sex,String address,int phone,String Email){
    this.number = number;
    this.ID = ID;
    this.name = name;
    this.age = age;
    this.sex = sex;
    this.address = address;
    this.phone = phone;
    this.Email = Email;
}
public int getNumber() {
    return number;
}
public void setNumber(int number) {
    this.number = number;
}
public int getID() {
    return ID;
}
public void setID(int iD) {
    ID = iD;
}
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public int getAge() {
    return age;
}
public void setAge(int age) {
    this.age = age;
}
public String getSex() {
    return sex;
}
public void setSex(String sex) {
    this.sex = sex;
}
public String getAddress() {
    return address;
}
public void setAddress(String address) {
    this.address = address;
}
public int getPhone() {
    return phone;
}
public void setPhone(int phone) {
    this.phone = phone;
}
public String getEmail() {
    return Email;
}
public void setEmail(String email) {
    Email = email;
}

}


public class Fruit {
private String name;
private int number;
private double price;

public Fruit(){}
public Fruit(String name,int number,double price){
    this.name = name;
    this.number = number;
    this.price = price;
}
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public int getNumber() {
    return number;
}
public void setNumber(int number) {
    this.number = number;
}
public double getPrice() {
    return price;
}
public void setPrice(double price) {
    this.price = price;
}

}

public class Box {
private double height;
private double width;
private double length;

public Box(){}
public Box(double height,double width,double length){
    this.height = height;
    this.width = width;
    this.length = length;
}

public double calculate_Volume(){
    return this.height*this.width*this.height*this.length;
}

public double getHeight() {
    return height;
}
public void setHeight(double height) {
    this.height = height;
}
public double getWidth() {
    return width;
}
public void setWidth(double width) {
    this.width = width;
}
public double getLength() {
    return length;
}
public void setLength(double length) {
    this.length = length;
}

}

 

转载于:https://my.oschina.net/u/3716815/blog/1560839

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值