-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCLIENTdemo.java
More file actions
37 lines (19 loc) · 900 Bytes
/
CLIENTdemo.java
File metadata and controls
37 lines (19 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
public class CLIENTdemo // THIS IS A CLIENT PROGRAM
{
public static void main(String[] args)
{
int gpa = 0, number = 0;
char letter = ' ';
String banana = "";
CLASSdemo quinn = new CLASSdemo(); // this is called INSTANTIATING the "quinn" OBJECT
quinn.displayHi(); // this calls the method displayGreeting
quinn.setInfo(); // notice: these 2 methods DO a task, they do not RETURN anything!
banana = quinn.getName(); // these methods RETURN some piece of information, hence the "banana =", so that the info is saved in banana
number = quinn.getAge();
letter = quinn.getInitial();
System.out.println("\n\n\n Hello, " + banana);
System.out.println("\n Your favorite # is: " + number);
System.out.println("\n Your favorite letter is " + letter);
quinn.displayByeBye();
}
}