Repository navigation
Expand file tree
/
Copy pathOrigin.java
More file actions
67 lines (51 loc) · 1.52 KB
/
Copy pathOrigin.java
File metadata and controls
67 lines (51 loc) · 1.52 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package mypackage;
import java.util.Scanner;
public class Origin {
public String bread;
public int age;
private String name;
public String types;
public static String saller = "Bose Company";
// public Origin() {
// this.bread = "Labrador";
// this.age = 19;
// this.name = "Tekka";
// this.types = "Puppy";
// }
public void setBread() {
Scanner obj = new Scanner ( System.in );
System.out.println ("Enter bread name");
bread = obj.nextLine ();
if (bread.equals ( "Labrador" ) ) {
System.out.println ( "Found the match" );
} else {
System.out.println ("not found");
}
}
public String setName(){
if (bread.equals ( "Labrador" ))
return "Tekka";
else
return "Not found";
}
public void setAge(){
System.out.println (19 + "Days puppy");
}
public void setTypes(){
Scanner nw = new Scanner ( System.in );
System.out.println ("Enter what types you want");
types=nw.nextLine ();
if (types.equals ( "Dog" )) {
System.out.println ("Not avalavle");
}
else {
System.out.println ("We sell puppy only please search about puppy");
}
}
public static void getSeller(){
System.out.println (saller);
}
public static void getSeller(String name){
System.out.println (name);
}
}