Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sdm/src/java/association/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

public class Person
{
int count;
Head head;
Torso torso;
Limbs limbs;
Person(int headCount, int torsoCount, int limbsCount)
int count; // Dead code, use your IDE to identify and remove dead code.
Head head; // Multiple instances rather than one instance with a count.
Torso torso; // Same
Limbs limbs; // Same
Person(int headCount, int torsoCount, int limbsCount) // Why not public? Also remove the "long" list of int parameters
{
head = new Head(headCount);
torso = new Torso(torsoCount);
limbs = new Limbs(limbsCount);
}
void showAll()
{
System.out.println("New person created.");
System.out.println("New person created."); // Remove
head.showAll();
torso.showAll();
limbs.showAll();
Expand Down