设计一个台灯类lamp其中台灯有灯泡这个属性java 怎么写
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设计一个台灯类lamp其中台灯有灯泡这个属性java 怎么写相关的知识,希望对你有一定的参考价值。
参考技术A你可以参照这个来
/*** ClassName:Department <br/>
* 部门类
*/
public class Department
private Integer departmentId;
private String departmentName;
public Integer getDepartmentId()
return departmentId;
public void setDepartmentId(Integer departmentId)
this.departmentId = departmentId;
public String getDepartmentName()
return departmentName;
public void setDepartmentName(String departmentName)
this.departmentName = departmentName;
import java.util.Date;
/**
* ClassName:Employee <br/>
* 员工类
*/
public class Employee
private Integer employeeId;
private String employeeName;
private Date hireDate;
private Department department;
public Integer getEmployeeId()
return employeeId;
public void setEmployeeId(Integer employeeId)
this.employeeId = employeeId;
public String getEmployeeName()
return employeeName;
public void setEmployeeName(String employeeName)
this.employeeName = employeeName;
public Date getHireDate()
return hireDate;
public void setHireDate(Date hireDate)
this.hireDate = hireDate;
public Department getDepartment()
return department;
public void setDepartment(Department department)
this.department = department;
参考技术B public class Lamp
//灯泡
private String bulb;
public String getBulb()
return bulb;
public void setBulb(String bulb)
this.bulb= bulb;
本回答被提问者采纳
以上是关于设计一个台灯类lamp其中台灯有灯泡这个属性java 怎么写的主要内容,如果未能解决你的问题,请参考以下文章
基于单片机工业生产现场的光照强度控制系统设计-基于单片机多功能智能台灯设计-基于单片机多功能智能台灯控制系统设计-资料转发分享