Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76699619
Java_573770
提交
255f6106
J
Java_573770
项目概览
2301_76699619
/
Java_573770
与 Fork 源项目一致
Fork自
inscode / Java
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Java_573770
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
255f6106
编写于
4月 18, 2024
作者:
2
2301_76699619
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thu Apr 18 21:33:00 CST 2024 inscode
上级
00470cde
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
172 addition
and
5 deletion
+172
-5
.inscode
.inscode
+4
-0
Main.java
Main.java
+168
-5
未找到文件。
.inscode
浏览文件 @
255f6106
run = "javac Main.java && java Main"
language = "java"
[debugger]
program = "Main"
Main.java
浏览文件 @
255f6106
class
Main
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Hello world!"
);
}
}
\ No newline at end of file
public
class
Person
{
private
String
name
;
private
String
address
;
private
String
phoneNumber
;
private
String
email
;
public
Person
(
String
name
,
String
address
,
String
phoneNumber
,
String
email
)
{
this
.
name
=
name
;
this
.
address
=
address
;
this
.
phoneNumber
=
phoneNumber
;
this
.
email
=
email
;
}
// Getters and Setters
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
}
public
class
Student
extends
Person
{
private
String
studentId
;
private
String
classStatus
;
private
String
college
;
public
Student
(
String
name
,
String
address
,
String
phoneNumber
,
String
email
,
String
studentId
,
String
classStatus
,
String
college
)
{
super
(
name
,
address
,
phoneNumber
,
email
);
this
.
studentId
=
studentId
;
this
.
classStatus
=
classStatus
;
this
.
college
=
college
;
}
// Getters and Setters
public
String
getStudentId
()
{
return
studentId
;
}
public
void
setStudentId
(
String
studentId
)
{
this
.
studentId
=
studentId
;
}
public
String
getClassStatus
()
{
return
classStatus
;
}
public
void
setClassStatus
(
String
classStatus
)
{
this
.
classStatus
=
classStatus
;
}
public
String
getCollege
()
{
return
college
;
}
public
void
setCollege
(
String
college
)
{
this
.
college
=
college
;
}
}
public
class
Employee
extends
Person
{
private
String
officeNumber
;
private
double
salary
;
private
Date
hireDate
;
public
Employee
(
String
name
,
String
address
,
String
phoneNumber
,
String
email
,
String
officeNumber
,
double
salary
,
Date
hireDate
)
{
super
(
name
,
address
,
phoneNumber
,
email
);
this
.
officeNumber
=
officeNumber
;
this
.
salary
=
salary
;
this
.
hireDate
=
hireDate
;
}
// Getters and Setters
public
String
getOfficeNumber
()
{
return
officeNumber
;
}
public
void
setOfficeNumber
(
String
officeNumber
)
{
this
.
officeNumber
=
officeNumber
;
}
public
double
getSalary
()
{
return
salary
;
}
public
void
setSalary
(
double
salary
)
{
this
.
salary
=
salary
;
}
public
Date
getHireDate
()
{
return
hireDate
;
}
public
void
setHireDate
(
Date
hireDate
)
{
this
.
hireDate
=
hireDate
;
}
}
public
class
Faculty
extends
Employee
{
private
String
officeHours
;
private
String
rank
;
public
Faculty
(
String
name
,
String
address
,
String
phoneNumber
,
String
email
,
String
officeNumber
,
double
salary
,
Date
hireDate
,
String
officeHours
,
String
rank
)
{
super
(
name
,
address
,
phoneNumber
,
email
,
officeNumber
,
salary
,
hireDate
);
this
.
officeHours
=
officeHours
;
this
.
rank
=
rank
;
}
// Getters and Setters
public
String
getOfficeHours
()
{
return
officeHours
;
}
public
void
setOfficeHours
(
String
officeHours
)
{
this
.
officeHours
=
officeHours
;
}
public
String
getRank
()
{
return
rank
;
}
public
void
setRank
(
String
rank
)
{
this
.
rank
=
rank
;
}
}
public
class
Staff
extends
Employee
{
private
String
title
;
public
Staff
(
String
name
,
String
address
,
String
phoneNumber
,
String
email
,
String
officeNumber
,
double
salary
,
Date
hireDate
,
String
title
)
{
super
(
name
,
address
,
phoneNumber
,
email
,
officeNumber
,
salary
,
hireDate
);
this
.
title
=
title
;
}
// Getters and Setters
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录