What's new

Closed Payroll system - search program

Status
Not open for further replies.

ashie

Enthusiast
Joined
Jan 12, 2017
Posts
2
Reaction
0
Points
62
PROGRAM OUTPUT
Employee Code: A12-0002
Employee Name: PEDREZUELA, Anthony G.


TEXT FILE (employee.txt)

A12-0001 CALIWARA, Richmond E.
A12-0002 PEDREZUELA, Anthony G.
A12-0003 FRESTO, Mary Aira B.


import java.io.File;
import java.util.*;

public class case1{

private static Scanner s;

public static void main(String [] args){
Scanner g = new Scanner(System.in);
String varCode;

System.out.println("Employee Code: ");
varCode=g.next();
}




i'm a newbie in java. Meron akong txt file bilang database ng aking program. Sa aking text file, meron akong two collums una ay sa employee id ikalawa ayy sa employee name sa aking program ay mag iinput ako ng employee code at dapat automatically na lalabas ang pangalan ng employee. Ano po ang kulang sa aking codes?

 
Gawa ka ng isang class or template for name id salary and so on gamit ka ng setter and getter method saka mo kunin sa main method mo yung iinput mo na kukunin nman ng getter method para makuha mo yung whole detail ng employee mo. Sana makatulong ts.
 
Status
Not open for further replies.

Similar threads

Back
Top