Question: use java language please and thank you Question 1 Implement the below interface and classes except the class NetworkDevice which you can assume its code

use java language please and thank you
Question 1 Implement the below interface and classes except the class NetworkDevice which you can assume its code exists when you need to call it : > Similar +isSimilar(o:Object): boolean Device Data Center - name: String - nbDevices : int - devices: Device[] +DataCenter (name: String, maxNbDevices:int) +getDevices():Device[] +addDevice(d: Device): boolean +displayServers():void +toString():String #id: int #brand: String +Device(all arguments) +toString():String NetworkDevice Server -operating System Type: String -availableServices: String -nbOfPorts: int -powerOverEthernet: boolean +NetworkDevice(all arguments) +toString(): String 1/getters and setters +Server (all arguments) +toString(): String +addAService(service:String): boolean +findAServie(service:String): boolean 1/getters and setters A. Device Class (An Abstract Class) - The toString method returns a String of the form Id: ...,Brand: .... . B. Server Class It has two private attributes: o operating System Type: the type of the installed operating system (ex: Linux Windows, TIUSI IIIg). S Ilg //getters and setters +toString(: String +addAService service:String): boolean +findAServie(service:String): boolean 1/getters and setters A. Device Class (An Abstract Class) - The toString method returns a String of the form Id: ...,Brand: .....' B. Server Class - It has two private attributes: o operating System Type: the type of the installed operating system (ex: Linux Windows, etc) o available Services: it is a string that contains all the installed services. It is of the following form: Servicel: Service2:Service3. Example: DHCP:DNS:MailService:WebService The method addAService takes the name of the new service and adds it at the end of the string availableServices, if it does not already exist. It returns false if the service is already installed, and true otherwise. The method findAService takes the name of a service and returns true if it is installed on this server, and false otherwise. The method isSimilar should be implemented in this class. It is used to compare two servers. Two servers are similar if they have the same brand, same operating system type and same installed services. The toString method returns a string with the following format: Server: Id:123, Brand: Lenove, Operating System: Windows, Services : DHCP, DNS, Mail
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
