Question: Write the java code of the interface IComputer that contains the followings: B/ The property IPAdress (number) with get and set assessors. The method

Write the java code of the interface IComputer that contains the followings:

Write the java code of the interface IComputer that contains the followings: B/ The property IPAdress (number) with get and set assessors. The method Cost() that returns the total cost of a computer (PriceComputer + Tax). Tax-5%. Write the java code of the abstract class Computer that contains the followings: 4 protected attributes: o Nunc, integer o SpeedCPU, number o Ram, number o PriceComputer, double A constructor that initializes the attributes of the class. A public property (with both set and get accessors) called Price, which is used to initialize the PriceComputer. Check if the Price is positive (>0). A virtual method PrintInfo() that prints the values of the attributes of the class. Write the java code of the class Server that inherits the base class Computer and implements the interface IComputer, and contains the followings: D/ A private attribute ipadress (number) Constructor that initializes all the attributes of the class. Override the method PrintInfo() that displays the values of the attributes of the class. Override and implement all the inherited methods and properties (form the inherited class and the implemented class). In the main method: Create an object of the class Computer; Create an array Cmp of type Server and size 2; Create 2 objects of Server: Store these objects in the array Cmp; Print the information of the stored objects in the array Cmp:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the Java code that satisfies the requirements mentioned Interface Computer interface Computer void setIPAddressint ipAddress int getIPAddress do... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!