瀏覽代碼

(refactor) Move constructor to top of class

main
Rob Hallam 1 年之前
父節點
當前提交
4b01248b29
共有 1 個檔案被更改,包括 9 行新增9 行删除
  1. +9
    -9
      week1.java

+ 9
- 9
week1.java 查看文件

@@ -33,6 +33,15 @@ class Section {

class Lab {

public Lab(int lN) {
String title = String.format("|Starting Lab %s|", lN);
this._labNumber = lN;

System.out.println("*".repeat(title.length()));
System.out.println(title);
System.out.println("*".repeat(title.length()));
}

private int _labNumber;
public Section currentSection;

@@ -52,15 +61,6 @@ class Lab {
System.out.println("-".repeat(title.length()));
}

public Lab(int lN) {
String title = String.format("|Starting Lab %s|", lN);
this._labNumber = lN;

System.out.println("*".repeat(title.length()));
System.out.println(title);
System.out.println("*".repeat(title.length()));
}

public int getLabNumber() {
return this._labNumber;
}


Loading…
取消
儲存