Question: Suppose you want to design a program that handles various renewable energy sources. Implement your design as a UML diagram with 4 classes (RenewableEnergy, Hydro,

Suppose you want to design a program that handles various renewable energy sources. Implement your design as a UML diagram with 4 classes (RenewableEnergy, Hydro, Wind, and Solar) and 10 variables (initialCapitalInvestment, peakPowerOutput, averagePowerOutput, heightDifference, peakFlow, averageFlow, maxWindSpeed, averageWindSpeed, latitude, and clearnessFactor) that are declared as instance variables in the classes. Draw a UML class diagram with class names, variable names, and inheritance arrows. Assume all variables are private. You may omit type specifications, constructors, and methods.

UML diagram:

Commission +COMMISSION_RATE: double = 0.10 +addSales(sales: double): void Commissioned -sales: double = 0.0

Commission +COMMISSION_RATE: double = 0.10 +addSales(sales: double): void Commissioned -sales: double = 0.0 +Commissioned(name: String) +addSales(sales: double): void +getPay(): double Salaried And Commissioned -sales: double +SalariedAndCommissioned( name: String, salary: double) +addSales(sales: double): void +getPay(): double Salaried2 -salary: double Employee2 -name: String +Employee2(name : String) +get Pay(): double +printPay (date: int) : void +Salaried2(name : String. salary: double) +getPay(): double Hourly2 -hourly Rate : double -hours: double = 0.0 +Hourly2(name : String. rate : double) +getPay(): double +addHours (hours: double): void Payrol13 +main(args: String[]): void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Introduction To Programming With Java A Problem Solving Approach Questions!