Лабораторная работа №3 (почти готово 3)

This commit is contained in:
DjonniStorm 2024-05-11 23:50:14 +04:00
parent 85918fccd1
commit 2393344f6d
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ public abstract class AbstractCompany {
protected int _pictureHeight;
public ICollectionGenericObjects<DrawningTruck> _collection = null;
private int GetMaxCount() {
return _pictureWidth / _placeSizeWidth * (_pictureHeight / _placeSizeHeight / 2) - 1;
return _pictureWidth / _placeSizeWidth * (_pictureHeight / _placeSizeHeight / 2);
};
public AbstractCompany(int picWidth, int picHeight, ICollectionGenericObjects<DrawningTruck> collection) {

View File

@ -73,8 +73,8 @@ public class FormAdditionalCollection extends JFrame {
}
private String ToString(IDrawningWheels wheels) {
if (wheels == null || wheels.getNumberOfWheels() == null)
return "Dont have wheels";
String str = "Wheel ";
return "Don't have wheels";
String str = "Wheels: ";
if (wheels instanceof DrawningCircleWheels) str += "Circle ";
else if (wheels instanceof DrawningRhombWheels) str += "Rhomb ";
else str += "Triangle ";