ppj/dev/pain/Computer.java
2024-06-24 23:29:41 +02:00

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);
}
}