Чтение данных из текстового файла и создание и объект, но текст имеет другую информацию об объекте - PullRequest
0 голосов
/ 23 февраля 2020

public class Date {
	private int day;
	private int month;
	private int year;
public class Phone {
	private int phone_country_code;
	private int phone_area_code;
	private int phone_number;

	public Phone(int phone_country_code, int phone_area_code, int phone_number) {
		super();
		this.phone_country_code = phone_country_code;
		this.phone_area_code = phone_area_code;
		this.phone_number = phone_number;
public class Student {
	private int student_number;
	private String student_name;
	private	String gender;
	private Phone student_phone;
	private Date student_birthdate;
	public Student(int student_number, String student_name, String gender, Phone student_phone,
			Date student_birthdate) {
		super();
		this.student_number = student_number;
		this.student_name = student_name;
		this.gender = gender;
		this.student_phone = student_phone;
		this.student_birthdate = student_birthdate;

Мне нужна помощь: я делаю программу управления стажировкой на Java, но у меня есть одна проблема, у меня есть текстовый файл (input.txt), в котором содержится вся информация о студентах и ​​преподавателях, например:

Кафедра, CME, Компьютерная инженерия, Asso c .Prof.Dr., Mehmet Hilal OZCANHAN, Res. Asst., Elife KIYAK, Res.Asst., Goksu TUYSUZOGLU, Обучение аппаратному обеспечению, 2, Обучение программному обеспечению, 4, Свободный, 6 Отдел, CEV, Инженерная защита окружающей среды, Проф. Res.Asst., Ахмет ТАРАК, Практическое обучение, 3, Теоретическое обучение, 2, Бесплатно, 5

Я классифицировал их по классу ученика и после этого должен перечислить все классы.

...