🔒 Closed Payroll system - search program

Status
Not open for further replies.

ashie

Leecher
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

About this Thread

  • 1
    Replies
  • 600
    Views
  • 2
    Participants
Last reply from:
Donqexote

Online now

Members online
341
Guests online
1,424
Total visitors
1,765

Forum statistics

Threads
2,285,406
Posts
29,029,822
Members
1,219,434
Latest member
ironwings2026
Back
Top