24 lines
542 B
Java
24 lines
542 B
Java
/*
|
|
* TASK 10
|
|
* archived at https://git.femboy.science/femsci/ppj/src/branch/task/10
|
|
* by femsci
|
|
*/
|
|
|
|
package dev.pain;
|
|
|
|
//uwuwuwuwuwuwu nested inheritance :3
|
|
public class Computer extends Calculator {
|
|
|
|
// i like composition and components >:3c
|
|
public Computer(String name) {
|
|
super(name);
|
|
}
|
|
|
|
@Override
|
|
public String calculate(double x, double y) {
|
|
|
|
return String.format("%s; %,.1f*%,.1f=%,.1f; %,.1f/%,.1f=%,.1f",
|
|
super.calculate(x, y),
|
|
x, y, x * y, x, y, x / y);
|
|
}
|
|
}
|