Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example; // Указывает, что класс ServerOperatingSystem находится в пакете com.example
- public class ServerOperatingSystem extends OperatingSystem { // Определяет класс ServerOperatingSystem, который наследуется от класса OperatingSystem
- private boolean guiSupported; // Объявляет приватное поле guiSupported типа boolean
- public ServerOperatingSystem(String name, String version, String kernelType, boolean guiSupported) { // Определяет конструктор класса ServerOperatingSystem с параметрами name, version, kernelType и guiSupported
- super(name, version, kernelType); // Вызывает конструктор суперкласса OperatingSystem с параметрами name, version и kernelType
- this.guiSupported = guiSupported; // Присваивает значение параметра guiSupported полю guiSupported
- }
- public boolean isGuiSupported() { // Определяет публичный метод isGuiSupported, который возвращает значение поля guiSupported
- return guiSupported; // Возвращает значение поля guiSupported
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement