📄 club.java
字号:
package ope.football;
/**
* The class <CODE>Club</CODE> represents football clubs in
* a match statistics system. Only some very basic information
* for each club is recorded. A club object is immutable once created.
*/
public class Club {
private String name; // fixed value
private int yearFormed; // fixed value
/**
* Creates a new club with the given basic information.
*
* @param name the name of the club
* @param yearFormed the year the club was formed
*/
public Club( String name, int yearFormed) {
this.name = name;
this.yearFormed = yearFormed;
}
/**
* Returns the name of the club.
*
* @return club name
*/
public String getName() {
return this.name;
}
/**
* Returns the year the club was formed.
*
* @return formation year
*/
public int getYearFormed() {
return this.yearFormed;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -