diff --git a/task-1/com.hyfacademy/Main.java b/task-1/com.hyfacademy/Main.java index d97363c..dec4cd2 100644 --- a/task-1/com.hyfacademy/Main.java +++ b/task-1/com.hyfacademy/Main.java @@ -1,7 +1,13 @@ package com.hyfacademy; +import com.hyfacademy.service.PlatformService; + public class Main { - static void main(String[] args) { - System.out.println("Hello World!"); + + public static void main(String[] args) { + + PlatformService platformService = new PlatformService(); + + platformService.run(); } -} +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/exception/AlreadyEnrolledException.java b/task-1/com.hyfacademy/exception/AlreadyEnrolledException.java index a82837e..3b291c4 100644 --- a/task-1/com.hyfacademy/exception/AlreadyEnrolledException.java +++ b/task-1/com.hyfacademy/exception/AlreadyEnrolledException.java @@ -1,4 +1,21 @@ package com.hyfacademy.exception; -public class AlreadyEnrolledException { +public class AlreadyEnrolledException extends EnrolmentException { + private final String studentName; + private final String courseName; + + public AlreadyEnrolledException(String studentName, String courseName) { + super(studentName + " is already enrolled in '" + courseName + "'"); + this.studentName = studentName; + this.courseName = courseName; + + } + + public String getStudentName() { + return studentName; + } + + public String getCourseName() { + return courseName; + } } diff --git a/task-1/com.hyfacademy/exception/CourseFullException.java b/task-1/com.hyfacademy/exception/CourseFullException.java index 11a76f1..a91eed1 100644 --- a/task-1/com.hyfacademy/exception/CourseFullException.java +++ b/task-1/com.hyfacademy/exception/CourseFullException.java @@ -1,4 +1,21 @@ package com.hyfacademy.exception; -public class CourseFullException { +public class CourseFullException extends EnrolmentException{ + private final String courseName; + private final int maxCapacity; + + public CourseFullException(String courseName, int maxCapacity){ + super("Course '" + courseName + "' is full (max: " + maxCapacity + " students)"); + this.courseName = courseName; + this.maxCapacity = maxCapacity; + + } + + public String getCourseName () { + return courseName; + } + + public int getMaxCapacity () { + return maxCapacity; + } } diff --git a/task-1/com.hyfacademy/exception/EnrolmentException.java b/task-1/com.hyfacademy/exception/EnrolmentException.java index 8454c32..5a8942b 100644 --- a/task-1/com.hyfacademy/exception/EnrolmentException.java +++ b/task-1/com.hyfacademy/exception/EnrolmentException.java @@ -1,4 +1,8 @@ package com.hyfacademy.exception; -public class EnrolmentException { -} +public class EnrolmentException extends RuntimeException { + public EnrolmentException (String message) { + super(message); + } + } + diff --git a/task-1/com.hyfacademy/exception/InvalidProgressException.java b/task-1/com.hyfacademy/exception/InvalidProgressException.java index c0c0037..d7733ce 100644 --- a/task-1/com.hyfacademy/exception/InvalidProgressException.java +++ b/task-1/com.hyfacademy/exception/InvalidProgressException.java @@ -1,4 +1,15 @@ package com.hyfacademy.exception; -public class InvalidProgressException { +public class InvalidProgressException extends EnrolmentException { + private final int attemptedValue; + + public InvalidProgressException (int attemptedValue) { + super("Progress must be between 0 and 100, but received: " + attemptedValue); + this.attemptedValue = attemptedValue; + } + + + public int getAttemptedValue () { + return attemptedValue; + } } diff --git a/task-1/com.hyfacademy/model/Course.java b/task-1/com.hyfacademy/model/Course.java index e80513e..38439da 100644 --- a/task-1/com.hyfacademy/model/Course.java +++ b/task-1/com.hyfacademy/model/Course.java @@ -1,4 +1,115 @@ package com.hyfacademy.model; -public class Course { -} +import com.hyfacademy.exception.AlreadyEnrolledException; +import com.hyfacademy.exception.CourseFullException; +import com.hyfacademy.exception.EnrolmentException; +import com.hyfacademy.exception.InvalidProgressException; +import com.hyfacademy.service.Enrollable; + +public abstract class Course implements Enrollable { + private final String courseName; + private final String courseId; + private final int maxStudents; + private int enrolledCount; + private final int[] studentProgress; + private final Student[] students; + private static int counter = 1; + + private static String generateId() { + return String.format("CRS-%03d", counter++); + } + + public Course(String courseName, int maxStudents) { + this.courseName = courseName; + this.maxStudents = maxStudents; + this.courseId = generateId(); + this.students = new Student[maxStudents]; + this.studentProgress = new int[maxStudents]; + this.enrolledCount = 0; + } + + public String getCourseName() { + return courseName; + } + + public String getCourseId() { + return courseId; + } + + public int getMaxStudents() { + return maxStudents; + } + + public int getEnrolledCount() { + return enrolledCount; + } + + public int[] getStudentProgress() { + return studentProgress; + } + + public Student[] getStudents() { + return students; + } + + public void enrol(Student student) { + if (enrolledCount >= maxStudents) { + throw new CourseFullException(courseName, maxStudents); + } + + for (int i = 0; i < enrolledCount; i++) { + if (students[i].getUserId().equals(student.getUserId())) { + throw new AlreadyEnrolledException(student.getName(), courseName); + } + } + + students[enrolledCount] = student; + studentProgress[enrolledCount] = 0; + enrolledCount++; + } + + public void updateProgress(Student student, int progress) { + if (progress < 0 || progress > 100) { + throw new InvalidProgressException(progress); + } + + for (int i = 0; i < enrolledCount; i++) { + if (students[i].getUserId().equals(student.getUserId())) { + studentProgress[i] = progress; + return; + } + } + + throw new EnrolmentException(student.getName() + " is not enrolled in '" + courseName + "'"); + } + + public int getStudentProgress(Student student) { + for (int i = 0; i < enrolledCount; i++) { + if (students[i].getUserId().equals(student.getUserId())) { + return studentProgress[i]; + } + } + + throw new EnrolmentException(student.getName() + " is not enrolled in '" + courseName + "'"); + } + + public boolean isFull() { + return enrolledCount >= maxStudents; + } + + public abstract String getCourseType(); + + public abstract String getScheduleInfo(); + + @Override + public String toString() { + return "[" + courseId + "] " + + courseName + + " (" + + getCourseType() + + ") | Enrolled: " + + enrolledCount + + "/" + + maxStudents; + } +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/model/LiveCohortCourse.java b/task-1/com.hyfacademy/model/LiveCohortCourse.java index a69fb63..7614f1c 100644 --- a/task-1/com.hyfacademy/model/LiveCohortCourse.java +++ b/task-1/com.hyfacademy/model/LiveCohortCourse.java @@ -1,4 +1,130 @@ package com.hyfacademy.model; +import com.hyfacademy.service.Reportable; -public class LiveCohortCourse { -} +public class LiveCohortCourse extends Course implements Reportable { + + private final String startDate; + private final String endDate; + private Mentor mentor; + + public LiveCohortCourse( + String courseName, + int maxStudents, + String startDate, + String endDate, + Mentor mentor + ) { + super(courseName, maxStudents); + + this.startDate = startDate; + this.endDate = endDate; + + assignMentor(mentor); + } + + public String getStartDate() { + return startDate; + } + + public String getEndDate() { + return endDate; + } + + public Mentor getMentor() { + return mentor; + } + + public void assignMentor(Mentor mentor) { + this.mentor = mentor; + mentor.assignToCourse(this); + } + + @Override + public String getCourseType() { + return "Live Cohort"; + } + + @Override + public String getScheduleInfo() { + return startDate + + " to " + + endDate + + " | Mentor: " + + mentor.getName(); + } + @Override + public String generateReport() { + + StringBuilder report = new StringBuilder(); + + report.append("══════════════════════════════════════════\n"); + report.append(" COURSE REPORT — Live Cohort\n"); + report.append("══════════════════════════════════════════\n"); + + report.append(" ID : ").append(getCourseId()).append("\n"); + report.append(" Name : ").append(getCourseName()).append("\n"); + + report.append(" Schedule : ") + .append(startDate) + .append(" to ") + .append(endDate) + .append("\n"); + + report.append(" Mentor : ") + .append(mentor.getName()) + .append("\n"); + + report.append(" Capacity : ") + .append(getEnrolledCount()) + .append("/") + .append(getMaxStudents()) + .append(isFull() ? " — FULL\n" : " — Open\n"); + + report.append("──────────────────────────────────────────\n"); + report.append(" STUDENT PROGRESS\n"); + report.append("──────────────────────────────────────────\n"); + + int total = 0; + + for (int i = 0; i < getEnrolledCount(); i++) { + + Student student = getStudents()[i]; + int progress = getStudentProgress()[i]; + + total += progress; + + int filled = Math.round(progress / 10.0f); + + StringBuilder bar = new StringBuilder(); + + for (int j = 0; j < 10; j++) { + if (j < filled) { + bar.append("█"); + } else { + bar.append("░"); + } + } + + report.append(String.format( + " %-9s %-20s %3d%% %s%n", + student.getUserId(), + student.getName(), + progress, + bar + )); + } + + int average = getEnrolledCount() == 0 + ? 0 + : total / getEnrolledCount(); + + report.append("──────────────────────────────────────────\n"); + report.append(" Avg Progress : ") + .append(average) + .append("%\n"); + + report.append("══════════════════════════════════════════"); + + return report.toString(); + } +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/model/Mentor.java b/task-1/com.hyfacademy/model/Mentor.java index b8738d5..473247e 100644 --- a/task-1/com.hyfacademy/model/Mentor.java +++ b/task-1/com.hyfacademy/model/Mentor.java @@ -1,4 +1,42 @@ package com.hyfacademy.model; -public class Mentor { +import com.hyfacademy.exception.EnrolmentException; + +public class Mentor extends User { + private final String expertise; + private final Course [] assignedCourses ; + private int courseCount; + private static int counter = 1; + + private static String generateId () { + return String.format("COA-%03d", counter++); + } + + public Mentor (String name, String email, String expertise) { + super(name,email,generateId()); + this.expertise = expertise; + this.assignedCourses = new Course[3]; + this.courseCount = 0 ; + + } + public void assignToCourse(Course course) { + if (courseCount >= assignedCourses.length) + { + throw new EnrolmentException(getName() + " cannot be assigned to more than 3 courses"); + } + assignedCourses[courseCount] = course ; + courseCount ++; + } + + public Course[] getAssignedCourses () { + return assignedCourses; + } + + public String getExpertise() { + return expertise; + } + @Override + public String getRole() { + return "MENTOR"; + } } diff --git a/task-1/com.hyfacademy/model/SelfPacedCourse.java b/task-1/com.hyfacademy/model/SelfPacedCourse.java index 055d64a..da13472 100644 --- a/task-1/com.hyfacademy/model/SelfPacedCourse.java +++ b/task-1/com.hyfacademy/model/SelfPacedCourse.java @@ -1,4 +1,95 @@ package com.hyfacademy.model; +import com.hyfacademy.service.Reportable; -public class SelfPacedCourse { -} +public class SelfPacedCourse extends Course implements Reportable { + + private int estimatedHours; + + public SelfPacedCourse( + String courseName, + int maxStudents, + int estimatedHours + ) { + super(courseName, maxStudents); + this.estimatedHours = estimatedHours; + } + + @Override + public String getCourseType() { + return "Self-Paced"; + } + + @Override + public String getScheduleInfo() { + return "Estimated: " + + estimatedHours + + " hours — complete at your own pace"; + } + @Override + public String generateReport() { + + StringBuilder report = new StringBuilder(); + + report.append("══════════════════════════════════════════\n"); + report.append(" COURSE REPORT — Self-Paced\n"); + report.append("══════════════════════════════════════════\n"); + report.append(" ID : ").append(getCourseId()).append("\n"); + report.append(" Name : ").append(getCourseName()).append("\n"); + report.append(" Capacity : ") + .append(getEnrolledCount()) + .append("/") + .append(getMaxStudents()) + .append(isFull() ? " — FULL\n" : " — Open\n"); + + report.append(" Est. Hours : ") + .append(estimatedHours) + .append("\n"); + + report.append("──────────────────────────────────────────\n"); + report.append(" STUDENT PROGRESS\n"); + report.append("──────────────────────────────────────────\n"); + + int total = 0; + + for (int i = 0; i < getEnrolledCount(); i++) { + + Student student = getStudents()[i]; + int progress = getStudentProgress()[i]; + + total += progress; + + int filled = Math.round(progress / 10.0f); + + StringBuilder bar = new StringBuilder(); + + for (int j = 0; j < 10; j++) { + if (j < filled) { + bar.append("█"); + } else { + bar.append("░"); + } + } + + report.append(String.format( + " %-9s %-20s %3d%% %s%n", + student.getUserId(), + student.getName(), + progress, + bar + )); + } + + int average = getEnrolledCount() == 0 + ? 0 + : total / getEnrolledCount(); + + report.append("──────────────────────────────────────────\n"); + report.append(" Avg Progress : ") + .append(average) + .append("%\n"); + + report.append("══════════════════════════════════════════"); + + return report.toString(); + } +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/model/Student.java b/task-1/com.hyfacademy/model/Student.java index 9f34d88..d5e84c8 100644 --- a/task-1/com.hyfacademy/model/Student.java +++ b/task-1/com.hyfacademy/model/Student.java @@ -1,4 +1,61 @@ package com.hyfacademy.model; +import com.hyfacademy.exception.AlreadyEnrolledException; +import com.hyfacademy.exception.EnrolmentException; -public class Student { +public class Student extends User { + private static int counter = 1; + private final Course [] enrolledCourses; + private int courseCount; + + private static String generateId() { + return String.format("STU-%03d", counter++); + } + + + public Student (String name,String email) { + super(name,email,generateId()); + this.enrolledCourses = new Course[5]; + this.courseCount = 0; + + } + + public void enrol (Course course) { + for(int i =0 ; i < courseCount ; i++) + if(enrolledCourses[i].getCourseName().equals(course.getCourseName())) { + throw new AlreadyEnrolledException(getName(),course.getCourseName()); + } + + if (courseCount >= enrolledCourses.length){ + throw new EnrolmentException("Student " + getName() + " cannot enrol in more than 5 courses"); + } + + enrolledCourses[courseCount] =course; + courseCount ++ ; + } + public Course[] getCourses() { + return enrolledCourses; + } + + public int getCourseCount() { + return courseCount; + } + + public int getProgress(String courseName) { + + for (int i = 0; i < courseCount; i++) { + if (enrolledCourses[i].getCourseName().equals(courseName)) { + return enrolledCourses[i].getStudentProgress(this); + } + } + + throw new EnrolmentException( + getName() + " is not enrolled in '" + courseName + "'" + ); + } + @Override + + public String getRole() { + return "STUDENT" ; + + } } diff --git a/task-1/com.hyfacademy/model/User.java b/task-1/com.hyfacademy/model/User.java index 43cba56..2d04926 100644 --- a/task-1/com.hyfacademy/model/User.java +++ b/task-1/com.hyfacademy/model/User.java @@ -1,4 +1,39 @@ package com.hyfacademy.model; -public class User { +public abstract class User { + private final String name; + private final String email; + private final String userId; + + public User (String name,String email,String userId) { + + this.name = name; + this.email = email; + this.userId = userId; + } + + public String getName () { + return name; + } + + public String getEmail () { + return email; + } + + public String getUserId () { + return userId; + } + + public abstract String getRole(); + + public String getSummary () { + + return "[" + getRole() + "]" + name + " | " + email ; + + } + + @Override + public String toString () { + return getSummary(); + } } diff --git a/task-1/com.hyfacademy/service/Enrollable.java b/task-1/com.hyfacademy/service/Enrollable.java index a8151b7..aabc1f2 100644 --- a/task-1/com.hyfacademy/service/Enrollable.java +++ b/task-1/com.hyfacademy/service/Enrollable.java @@ -1,4 +1,14 @@ package com.hyfacademy.service; +import com.hyfacademy.model.Student; -public class Enrollable { -} +public interface Enrollable { + void enrol(Student student); + boolean isFull(); + int getEnrolledCount(); + int getMaxStudents(); + + default String capacityStatus() { + return getEnrolledCount() + "/" + getMaxStudents() + + (isFull() ? " — FULL" : " — Open"); + } +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/service/PlatformService.java b/task-1/com.hyfacademy/service/PlatformService.java index 4248597..3c4317a 100644 --- a/task-1/com.hyfacademy/service/PlatformService.java +++ b/task-1/com.hyfacademy/service/PlatformService.java @@ -1,4 +1,363 @@ package com.hyfacademy.service; +import com.hyfacademy.exception.AlreadyEnrolledException; +import com.hyfacademy.exception.CourseFullException; +import com.hyfacademy.exception.EnrolmentException; +import com.hyfacademy.exception.InvalidProgressException; +import com.hyfacademy.model.Course; +import com.hyfacademy.model.LiveCohortCourse; +import com.hyfacademy.model.Mentor; +import com.hyfacademy.model.SelfPacedCourse; +import com.hyfacademy.model.Student; + +import java.util.Scanner; + public class PlatformService { -} + + private final Course[] courses = new Course[10]; + private int courseCount = 0; + + private final Student[] students = new Student[20]; + private int studentCount = 0; + + private final Mentor[] mentors = new Mentor[5]; + private int mentorCount = 0; + + private final Scanner scanner = new Scanner(System.in); + + public void addStudent() { + if (studentCount >= students.length) { + System.out.println("Error: student list is full."); + return; + } + + System.out.print("Name: "); + String name = scanner.nextLine(); + + System.out.print("Email: "); + String email = scanner.nextLine(); + + Student student = new Student(name, email); + students[studentCount] = student; + studentCount++; + + System.out.println("Student added: " + student.getSummary()); + } + + public void addMentor() { + if (mentorCount >= mentors.length) { + System.out.println("Error: mentor list is full."); + return; + } + + System.out.print("Name: "); + String name = scanner.nextLine(); + + System.out.print("Email: "); + String email = scanner.nextLine(); + + System.out.print("Expertise: "); + String expertise = scanner.nextLine(); + + Mentor mentor = new Mentor(name, email, expertise); + mentors[mentorCount] = mentor; + mentorCount++; + + System.out.println("Mentor added: " + mentor.getSummary()); + } + + public void addCourse() { + if (courseCount >= courses.length) { + System.out.println("Error: course list is full."); + return; + } + + try { + System.out.print("Type (self-paced/live cohort): "); + String type = scanner.nextLine(); + + System.out.print("Course name: "); + String courseName = scanner.nextLine(); + + System.out.print("Max students: "); + int maxStudents = Integer.parseInt(scanner.nextLine()); + + if (type.equalsIgnoreCase("self-paced")) { + System.out.print("Estimated hours: "); + int estimatedHours = Integer.parseInt(scanner.nextLine()); + + Course course = new SelfPacedCourse(courseName, maxStudents, estimatedHours); + courses[courseCount] = course; + courseCount++; + + System.out.println("Course added: " + course); + + } else if (type.equalsIgnoreCase("live cohort")) { + System.out.print("Start date: "); + String startDate = scanner.nextLine(); + + System.out.print("End date: "); + String endDate = scanner.nextLine(); + + System.out.print("Mentor ID: "); + String mentorId = scanner.nextLine(); + + Mentor mentor = findMentorById(mentorId); + + if (mentor == null) { + System.out.println("Error: mentor not found."); + return; + } + + Course course = new LiveCohortCourse( + courseName, + maxStudents, + startDate, + endDate, + mentor + ); + + courses[courseCount] = course; + courseCount++; + + System.out.println("Course added: " + course); + + } else { + System.out.println("Error: invalid course type."); + } + + } catch (NumberFormatException e) { + System.out.println("Error: max students / estimated hours must be valid numbers."); + } catch (EnrolmentException e) { + System.out.println("Error: " + e.getMessage()); + } + } + + public void enrolStudent() { + try { + System.out.print("Student ID: "); + String studentId = scanner.nextLine(); + + System.out.print("Course ID: "); + String courseId = scanner.nextLine(); + + Student student = findStudentById(studentId); + Course course = findCourseById(courseId); + + if (student == null) { + System.out.println("Error: student not found."); + return; + } + + if (course == null) { + System.out.println("Error: course not found."); + return; + } + + course.enrol(student); + student.enrol(course); + + System.out.println("Student enrolled successfully."); + + } catch (CourseFullException e) { + System.out.println("Error: " + e.getMessage()); + } catch (AlreadyEnrolledException e) { + System.out.println("Error: " + e.getMessage()); + } catch (EnrolmentException e) { + System.out.println("Error: " + e.getMessage()); + } + } + + public void updateProgress() { + try { + System.out.print("Student ID: "); + String studentId = scanner.nextLine(); + + System.out.print("Course ID: "); + String courseId = scanner.nextLine(); + + System.out.print("Progress: "); + int progress = Integer.parseInt(scanner.nextLine()); + + Student student = findStudentById(studentId); + Course course = findCourseById(courseId); + + if (student == null) { + System.out.println("Error: student not found."); + return; + } + + if (course == null) { + System.out.println("Error: course not found."); + return; + } + + course.updateProgress(student, progress); + + System.out.println("Progress updated successfully."); + + } catch (InvalidProgressException e) { + System.out.println("Error: " + e.getMessage()); + } catch (NumberFormatException e) { + System.out.println("Error: progress must be a valid integer."); + } catch (EnrolmentException e) { + System.out.println("Error: " + e.getMessage()); + } finally { + System.out.println("Progress update operation finished."); + } + } + + public void viewAllCourses() { + if (courseCount == 0) { + System.out.println("No courses registered."); + return; + } + + System.out.printf("%-10s %-25s %-15s %-15s%n", + "ID", "Name", "Type", "Capacity"); + + System.out.println("----------------------------------------------------------------"); + + for (int i = 0; i < courseCount; i++) { + Course course = courses[i]; + + System.out.printf("%-10s %-25s %-15s %-15s%n", + course.getCourseId(), + course.getCourseName(), + course.getCourseType(), + course.capacityStatus()); + } + } + + public void viewCourseReport() { + System.out.print("Course ID: "); + String courseId = scanner.nextLine(); + + Course course = findCourseById(courseId); + + if (course == null) { + System.out.println("Error: course not found."); + return; + } + + if (course instanceof Reportable) { + Reportable reportable = (Reportable) course; + System.out.println(reportable.generateReport()); + } else { + System.out.println("Error: this course does not support reports."); + } + } + + public void viewAllStudents() { + if (studentCount == 0) { + System.out.println("No students registered."); + return; + } + + for (int i = 0; i < studentCount; i++) { + Student student = students[i]; + + System.out.println( + student.getSummary() + + " | Enrolled courses: " + + student.getCourseCount() + ); + } + } + + public void run() { + + while (true) { + + System.out.println(); + System.out.println("╔══════════════════════════════════════════╗"); + System.out.println("║ HYF ACADEMY COURSE PLATFORM ║"); + System.out.println("╚══════════════════════════════════════════╝"); + System.out.println(" 1. Add course"); + System.out.println(" 2. Add student"); + System.out.println(" 3. Add mentor"); + System.out.println(" 4. Enrol student in course"); + System.out.println(" 5. Update student progress"); + System.out.println(" 6. View all courses"); + System.out.println(" 7. View course report"); + System.out.println(" 8. View all students"); + System.out.println(" 9. Exit"); + System.out.println("══════════════════════════════════════════"); + + System.out.print("Choose an option: "); + String choice = scanner.nextLine(); + + switch (choice) { + + case "1": + addCourse(); + break; + + case "2": + addStudent(); + break; + + case "3": + addMentor(); + break; + + case "4": + enrolStudent(); + break; + + case "5": + updateProgress(); + break; + + case "6": + viewAllCourses(); + break; + + case "7": + viewCourseReport(); + break; + + case "8": + viewAllStudents(); + break; + + case "9": + System.out.println("Goodbye."); + return; + + default: + System.out.println("Error: invalid menu option."); + } + } + } + + private Student findStudentById(String studentId) { + for (int i = 0; i < studentCount; i++) { + if (students[i].getUserId().equals(studentId)) { + return students[i]; + } + } + + return null; + } + + private Course findCourseById(String courseId) { + for (int i = 0; i < courseCount; i++) { + if (courses[i].getCourseId().equals(courseId)) { + return courses[i]; + } + } + + return null; + } + + private Mentor findMentorById(String mentorId) { + for (int i = 0; i < mentorCount; i++) { + if (mentors[i].getUserId().equals(mentorId)) { + return mentors[i]; + } + } + + return null; + } +} \ No newline at end of file diff --git a/task-1/com.hyfacademy/service/Reportable.java b/task-1/com.hyfacademy/service/Reportable.java index 0c8ae05..51481f8 100644 --- a/task-1/com.hyfacademy/service/Reportable.java +++ b/task-1/com.hyfacademy/service/Reportable.java @@ -1,4 +1,5 @@ package com.hyfacademy.service; -public class Reportable { -} +public interface Reportable { + String generateReport(); +} \ No newline at end of file