-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStaff.java
More file actions
37 lines (33 loc) · 1012 Bytes
/
Staff.java
File metadata and controls
37 lines (33 loc) · 1012 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
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~
--||author : codechaser||--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
package java_labs.lab_3.problem_5;
import java.util.*;
import java.io.*;
class Staff extends Student {
private String name = "", work = "";
public void takeInput() {
super.takeInput();
Scanner input = new Scanner(System.in);
System.out.println("\nEnter Name:");
this.name = input.nextLine();
System.out.println("\nEnter Work:");
this.work = input.nextLine();
return;
}
public void printOutput() {
super.printOutput();
System.out.print("\nName: " + this.name);
System.out.print("\nWork: " + this.work);
return;
}
}
/*
|---------------------------------------------------|
||| https://codeforces.com/profile/codechaser |||
||| https://www.codechef.com/users/codechaser |||
||| https://github.com/code-chaser |||
|---------------------------------------------------|
*/