0

Please help me correct this error

public class StudentProfile { private String name; private int age; private int learningStyle; private int learningPace; public void setLearningStyle(int style) { this.learningStyle = style; } public void setLearningPace(int pace) { this.learningPace = pace; } public int getLearningStyle() { return this.learningStyle; } public int getLearningPace() { return this.learningPace; } } public class Lesson { private String name; private int difficultyLevel; public void customizeForStudent(StudentProfile student) { if (student.getLearningStyle() == 1) { // customize lesson for visual learners } else if (student.getLearningStyle() == 2) { // customize lesson for auditory learners } } }

6th Feb 2023, 6:02 AM
mohammed sani
mohammed sani - avatar
2 Réponses
+ 2
Your code is incomplete
6th Feb 2023, 6:07 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
for run, you need class with main() method where create student profile set his style create lesson customize it for the student also do something in customizeForStudent() method to see / set some result
6th Feb 2023, 7:51 AM
zemiak