From 0b16cf927b51ea7a9bf68e967cf397d3f26df9df Mon Sep 17 00:00:00 2001 From: BadOfficer Date: Wed, 22 Feb 2023 00:46:09 +0200 Subject: [PATCH] Added documentation for Lab4 --- .../lab4/Boat.java | 15 +++------------ .../lab4/Lab4.java | 5 +++++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Boat.java b/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Boat.java index 275183d..1237be6 100644 --- a/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Boat.java +++ b/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Boat.java @@ -1,5 +1,8 @@ package IO_24._02_Бондаренко_Тарас_Андрійович.lab4; +/** + * Class that represents a boat with different characteristics. + */ public class Boat { private String name; private int price; @@ -23,18 +26,6 @@ public class Boat { return price; } - public int getMass() { - return mass; - } - - public int getAge() { - return age; - } - - public String getType() { - return type; - } - @Override public String toString() { return String.format("%s - %s, which was built %d years ago, with mass - %d kg, has price - %d$;", diff --git a/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Lab4.java b/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Lab4.java index 423c902..9e5ee15 100644 --- a/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Lab4.java +++ b/src/IO_24/_02_Бондаренко_Тарас_Андрійович/lab4/Lab4.java @@ -22,6 +22,11 @@ public class Lab4 { printed(boatList); } + /** + * Print all characteristics of boats. + * + * @param boatList List of boats. + */ public static void printed(List boatList) { for (Boat boat : boatList) { System.out.println(boat);