+1(805) 568 7317

using your choice of pseudocode c or java declare class computer the computer class 5155112

Using your choice of Pseudocode, C# or Java, declare class Computer. The Computer class contains two attributes: model (String type) and price (double type). Your class should have a constructor, setters (mutators) and getters (accessors) for the attributes and a method:

compInfo( )

to display the attributes of the computer object’s model and price. In at least one of the setter methods, use the “this” operator. You don’t need to declare the main method.

Then write class Laptop that inherits from the Computer class, described above. The Laptop class contains the following two attributes: brand (String type) and weight (float type) and another method:

laptopInfo( )

to display the attributes of the Laptop object’s brand and weight.

In the Laptop class, also override the compInfo() method so that it displays all four attributes: model, price, brand, and weight. You don’t need to include the main() method. Do not redeclare things that are inherited.

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now