13 August 2026 · 8 min read
Java assignments in first and second year are rarely about whether the program runs. The rubric usually allocates most of its marks to design quality: are responsibilities in the right classes, is state properly encapsulated, is inheritance used where it belongs, and is the code readable by someone who did not write it.
Read the specification and list the things the system deals with — Student, Course, Enrolment, Library, Loan. Then give each one a single responsibility you can state in a sentence. If a class needs the word "and" to describe it, it is probably two classes. A Manager or Handler class that does everything is the most common design smell in submitted work.
Use inheritance only for a genuine "is-a" relationship where the subclass can substitute for the parent everywhere. A SavingsAccount is an Account. A Car is not an Engine — it has one, so use composition. Marks are commonly lost for inheritance hierarchies built to share a couple of helper methods; that is what composition or a utility class is for. Where you do inherit, use @Override explicitly and respect the parent's contract.
An interface defines a capability that unrelated classes can implement — Comparable, Printable, Payable. An abstract class shares partial implementation among related classes. If your assignment asks you to demonstrate polymorphism, the clearest way is a collection of the parent type holding different subclasses, iterated with a single method call that behaves differently per type. Say so in your documentation; markers look for the demonstration, not just the capability.
Follow Java naming conventions consistently: classes in PascalCase, methods and variables in camelCase, constants in upper snake case. Add Javadoc on public classes and methods explaining purpose, parameters and return values. Include a class diagram if the brief asks for one, and make sure it matches the code you submitted. These are the quickest marks in the assignment and the ones most often left on the table.
Assignment Byte's programming tutors can review your Java design, testing and documentation, and walk you through the reasoning so you can defend it.