객체 썸네일형 리스트형 자바 객체 간 협력 - Do it! 자바프로그래밍기초 public class Student { public String studentName; public int grade; public int money; public Student(String studentName, int money) { this.studentName = studentName; this.money = money; } public void takeBus(Bus bus) { bus.take(1000); this.money -= 1000; } public void takeSubway(Subway subway) { subway.take(1500) this.money -= 1500; } public showInfo() { System.out.println("studentName + "님의 남은 .. 더보기 이전 1 다음