Search Results

Search found 1 results on 1 pages for 'user208639'.

Page 1/1 | 1 

  • programming help

    - by user208639
    class Person holds personal data Its constructor receives 3 parameters, two Strings representing first and last names and an int representing age public Person(String firstName, String lastName, int age) { its method getName has no parameters and returns a String with format "Lastname, Firstname" its method getAge takes no parameters and returns an int representing the current age its method birthday increases age value by 1 and returns the new age value Create the class Person and paste the whole class into the textbox below public class Person { public Person(String first, String last, int age) { getName = "Lastname, Firstname"; System.out.print(last + first); getAge = age + 1; return getAge; System.out.print(getAge); birthday = age + 1; newAge = birthday; return newAge; } } im getting errors such as "cannot find symbol - variable getName" but when i declare a variable it still not working, i also wanted to ask if i am heading in the right direction or is it all totally wrong? im using a program called BlueJ to work on.

    Read the article

1