[Solved] ECE325 Lab 3- Inheritance, Hash, Design Pattern and Big Number Objectives
5.0
1 customer review
Digital download
Digital download
$25.00
Message us on WhatsApp for payment or download support.
| Person |
| extends |
| SwEngineer | gets all the attributes and methods defined in: | SwEngineer | , | Employee | and | Person |
| public | / | private | . An attribute is usually | private |
| Java implements interface through the | implements | keyword. |
| interface SalaryRaisable { public double RaiseSalary();}class Employee implements SalaryRaisable { double baseSalary;@Overridepublic double RaiseSalary() { return baseSalary *= 1.2;}} | ||
| public static void main(String[] args) |
| cases anywhere you like), where the two interfacesAlso, your classes will only have the attributes and methods menti |
|
and |
|
are already provided. | ||
| oned in the diagram. |
| super |
| RaiseSalary |
| HwEngineer |
| ProjManager |
| HwEngineer | with base salary of $3000, and an instance of | ProjManager |
| | Person || name: String ||-| + Person(name: String) || + getName(): String |^ ^extends | | extends +- -+| | - implements | Employee | | Customer | > | <<interface>> | - | Printable || baseSalary: double | | projPrice: double | +> || - | | + PrintInfo(): || + Employee( | | + Customer( | | | String || name: String, | | name: String, | | | baseSalary: double) | | projPrice: double) | || + getBaseSalary(): double | | + getProjPrice(): double | | - | ^ ^ | extends | | extends | | ++ || | | - || SwEngineer | | HwEngineer | + - | || projName: String | | | | ||| - | || + SwEngineer( | | + HwEngineer( | | || name: String, | | name: String, | | | implements| baseSalary: double, | | baseSalary: double) | | || projName: String) | | | | || + getProjName(): String | | | | | - | |^ | || extends | | implements | | | ProjManager | -+ +> | <<interface>> | | SalaryRaisable || projDeadline: Date | > || implements | + RaiseSalary(): || + ProjManager( | | double | | name: String, | | baseSalary: double, || projName: String, || projDeadline: Date) || + getProjDeadline(): Date | |
| PrintInfo |
| Customer | : |
| ProjManager | |
| SwEngineer | and | ProjManager |
| equals | , you still need to override | hashCode |
| equals | and | hashCode |
| long | , because Java doesnt have unsigned version of | int | / | long |
| BigInteger |