Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /**
- * Write a description of class Applicant here.
- *
- * @author (Your mom)
- * @version (perturbed koala)
- */
- public class Applicant
- {
- // instance variables - replace the example below with your own DICK
- private String name;
- private String surname;
- private int age;
- private String sex;
- private String schoolname;
- private Results[] results;
- Scanner user_input= new Scanner (System.in);
- /**
- * Constructor for objects of class Applicant's DICK
- */
- public Applicant(String input_name, String input_surname, int input_age, String input_sex, String input_schoolname)
- {
- // initialise instance variables
- this.name=input_name;
- this.surname=input_surname;
- this.age=input_age;
- this.sex=input_sex;
- this.schoolname=input_schoolname;
- }
- public String inputDetails() //method that takes user's input and assigns it to variables
- {
- System.out.print("Enter applicant's name: ");
- public String input_name=user_input.next();
- System.out.print("Enter applicant's surname: ");
- public String input_surname=user_input.next();
- System.out.print("Enter applicant's age: ");
- public String input_age=user_input.nextInt();
- System.out.print("Enter applicant's sex: ");
- public String input_sex=user_input.next();
- System.out.print("Enter applicant's school: ");
- public String input_schoolname=user_input.next();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement