Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Person {
- private String name;
- private int height;
- private double money;
- public Person(String name, int height, double money){
- this.name = name;
- this.height = height;
- this.money = money;
- }
- static int addition(int firstValue, int secondValue){
- int result;
- result = firstValue + secondValue;
- return result;
- }
- static void whoIsTaller(Person one, Person two){
- if (one.height > two.height){
- System.out.println(one.name + " is taller");
- } else if (one.height == two.height){
- System.out.println("Height is same");
- } else {
- System.out.println(two.name + " is taller");
- }
- }
- static void paidForLLSurgery(Person test, String lldoctor){
- if (test.money < 80000){
- System.out.println("sorry not enough money");
- } else {
- test.money = test.money - 80000;
- System.out.println("paid for LL from " + lldoctor);
- }
- }
- double checkBalance(){
- return this.money;
- }
- static void printLoop(){
- for (int i = 0; i < 100000000; i ++ ){
- System.out.println(i);;
- }
- }
- public static void main(String args[]){
- // Person Aaron = new Person("Aaron", 165, 100000.0);
- // Person Doggy = new Person("Doggy", 155, 530.0);
- // System.out.println("Aaron money is " + Aaron.money);
- // paidForLLSurgery(Aaron, "doctorp aley");
- // System.out.println(Aaron.checkBalance());
- // whoIsTaller(Aaron, Doggy);
- System.out.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement