Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Aktion{
- private int i,k;
- public Aktion(int p){
- i = p*10;
- k = 10;
- }
- public void set(int q){
- i = q/1; //oder so ^^
- }
- public int get(){
- return i;
- }
- }
- // Neue Klasse
- public class Rechner{
- private Aktion akt;
- public Rechner(Aktion a){
- akt = a;
- }
- public int doIt(int i){
- if(i > 0){
- akt.set(i*100);
- }
- return akt.get();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement