Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

homework2 #82

Open
wants to merge 9 commits into
base: DCHC7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions Average.java

This file was deleted.

22 changes: 0 additions & 22 deletions Change.java

This file was deleted.

25 changes: 25 additions & 0 deletions Entry.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import java.util.Scanner;

public class Entry {
int speed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Car 클래스와 main 함수가 속한 클래스를 분리해주세요.

String name = "";

public static void main(String args[]) {
int entryNumber;
Scanner scanner = new Scanner(System.in);
System.out.println("참가자 수를 입력하세요.");
entryNumber = scanner.nextInt();
Entry[] entryArray = new Entry[entryNumber];
for (int a = 0; a < entryNumber; a++) {
entryArray[a] = new Entry();
System.out.println(a + 1 + "번째 참가자의 speed를 입력하세요.");
entryArray[a].speed = scanner.nextInt();
System.out.println(a + 1 + "번째 참가자의 이름를 입력하세요.");
entryArray[a].name = scanner.next();
}
System.out.println("---------참가자 소개----------");
for (int a = 0; a < entryNumber; a++) {
System.out.println("speed : " + entryArray[a].speed + " name : " + entryArray[a].name);
}
}
}
12 changes: 0 additions & 12 deletions IDNumber.java

This file was deleted.

15 changes: 0 additions & 15 deletions ListToArray.java

This file was deleted.

17 changes: 0 additions & 17 deletions ToSet.java

This file was deleted.

1 change: 0 additions & 1 deletion test1.txt

This file was deleted.