Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

All about programming (Specially c, c++, VB, Java)

hi sir may case stud po kame pwede ba ko humingi ng tulong ka symbianize? ang hirap po eh using jcreator.. java applets po...MERC Book Store
(Using Applets)

Create a program in java that computes a list of grocery items in MERC grocery.

REQUIREMENTS:

1. There are only 2 shifting cashier/s in MERC Grocery, which accepts only nine characters (9) series of code.
Cashier Name Cashier Code
1. Maria Liwayway Hienn1234
2. Jose Mariotte Mario0912

2. Label a text box that would accept a bar code of a product in the table given and compute for the item/s purchased.
a. The item/s to be purchased may be more than one per product code.
b. Prompt error if bar code typed is not in the list.
3. Compute for a change of the amount given by the customer.
a. Prompt error if the amount given is less than the amount tender.
4. The program will accept CREDIT CARD payments.
a. The program accepts CARD NUMBER, Name of Card Holder, Date, purchased Item/s
b. It will accept the following:
i. Installments – payable by three months, 6 months, 9 months, 12 months (minimum amount of purchased item/s 3000 pesos)
ii. Straight Payments – the tendered item price is payable in one month
iii. The program will validate the card holder number by typing a valid ID. (SSS ID, Passport, Employee ID, Phil Health). Type the ID number.


Bar Code
Category
Brand
Number of Stock Items Price per piece
M1234 Magazine Memopolitan 100 120
M5678 EHEC-HEP-EMS 185 145
M9012 BOUGE 123 185

SU123 Supplies Penda 50 3.50
SU234 Chattylea 205 25.00
SU567 Istapyler 100 32.75

BO907 Books No Man is an Island out there by: Noman 298 201
BO657 Wer na u ditto na me?! By: Achuchuchu 328 1255
BO812 You and Me not against the world by : Selfish 470 243



hahaah kay maam cervantes ito ah
 
PASSWORD ENCRYPTION? kung java yan eto. http://www.devarticles.com/c/a/Java/Password-Encryption-Rationale-and-Java-Example/

bale idea ko pag ganyan isa isa mong iaasign ung values ng character eh. wari

String a = d, b = e, c = f, d = g;

pasensya na idea ko lang.

err, hindi po hashing.. bali gusto ko lang mapalitan yung cover sa password.. diba pag nag type ka ng password ang lilitaw usually is star(*) Password: ******* (1234567 real value)
ang gusto ko sana mangyari eh ganito
Password: Jynx0101 (12345678 real value)

NVM


anyway, pano ba ako mag dedelete ng isang character sa JTextField?.. example:

ang laman ng JTF ko eh "KAMOTE"
magiging "KAMOT" dapata... bali hindi siya naka array..
 
err, hindi po hashing.. bali gusto ko lang mapalitan yung cover sa password.. diba pag nag type ka ng password ang lilitaw usually is star(*) Password: ******* (1234567 real value)
ang gusto ko sana mangyari eh ganito
Password: Jynx0101 (12345678 real value)

NVM


anyway, pano ba ako mag dedelete ng isang character sa JTextField?.. example:

ang laman ng JTF ko eh "KAMOTE"
magiging "KAMOT" dapata... bali hindi siya naka array..

http://codeguru.earthweb.com/java/articles/384.shtml
 
Pa help po pano po mag display ng ganito using loop sa C???
*
**
***
****
*****
******
*******
********
*********
**********
:weep:
 
Last edited:
panu mag compile ng c++ na mag rurun sa ibang pc
kasi ung isa dpat may nka install na net frame work panu un kahit 6.0 na mag rurun sa ibang pc please
 
@zenai18

import java.io.*;

public class NewClass {

public static void main(String[] args) {

for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print("*");
}
System.out.println(" ");
}
System.out.println("");
for (int i = 1; i <= 5; i++) {
for (int j = i; j <= 5; j++) {
System.out.print("*");
}
System.out.println(" ");
}
for (int i = 1; i <= 5; i++)
{
for (int k=i;k<5;k++)
{
System.out.print(" ");
}

for (int j = i; j > 0; j--)
{
System.out.print("*");
}
System.out.println(" ");
}


System.out.println("");

int f=1;




for (int i = 5; i>=1; i--)
{
for (int j = i; j >=1; j--)
{
System.out.print("*");
}

System.out.println(" ");

for (int k=0;k<f;k++)
{
System.out.print(" ");
}
f++;
}





}
}
 
@zenai ganito labas nean :))
Code:
*
**
***
****
*****

*****
****
***
**
*

        *
      **
    ***
  ****
*****

*****
  ****
    ***
      **
        *
 
sir pa help naman c++ need k gmwa ng textfile employee records tpos kailangan ng switch para sa add,edit,view ska search records sana bgyan mko example thanks
 
sir pa help naman c++ need k gmwa ng textfile employee records tpos kailangan ng switch para sa add,edit,view ska search records sana bgyan mko example thanks

search mo ang forum for payroll in C. may pinost ako dun na similar sa hinahanap mo
 
Sir! SQL po in vb6?Im using access as my database. Nagcreate po aq 2 table. Ung isa members at ung isa transactions. Nagcreate aq ng query and ung relation nila isa client_number. Ung primary table eh ung pong members, so pag tinignan q table nia sa acces my maliit n "+" sa side nia. Ung info n ilalagay q dun sa subtable eh mag aapear dn sa transaction table. Pano q po iccode ung sa vb? Tnx po in advance
 
sir meron kaba c++ program dyan na switch gamit textfile employee records gagawin eto kasama employee no.,name , department ,position ,rate yan po tpos sa switch menu add records,edit records,view records ,search records di ko kc makuha ung program n yan pa help naman pagmeron ka post m naman pagaaralan ko thanks god bless
 
eto yung program ko baka pwde nyo ayusin lagyan ng switch para kahit pwde pumili ng gagawin kung add,view,edit,search thanks

// add new employee
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<iomanip.h>
#include<string.h>

struct e
{
char empno[50];
char name[20];
char dept[15];
char position[20];
char rate[20];

};
struct e emp;
int k,x,y;
int a=sizeof(emp),flag=0;
fstream employ,out;
char ans='y',ans2='Y',sgt;;
char empno[50];
char name[20];
char dept[15];
char position[20];
char rate[20];
void head();
void line(int y);
void search();
void add ();
void edit();
void view();

main()
{
add();
edit();
view();
search();
head();
cin.get();
cin.get();
return 0;
}
void add(fstream &file)
{
employ.open("employ.txt",ios::app);
if (employ.fail())
{
cout<<"Error wrutting to output file ";
cin.get();
cin.get();
exit(1);
}
while(ans)
{
clrscr();
for(k=1;k<=80;k++)
{
gotoxy(k,2);cout<<"-";
}
gotoxy(20,3);cout<<" ADD NEW EMPLOYEE RECORDS ";
for(k=1;k<=80;k++)
{
gotoxy(k,4);cout<<"-";
}

gotoxy(12,7);cout<<"Employee No. ";
gets(emp.empno);
gotoxy(12,9);cout<<"Employee Name ";
gets(emp.name);
gotoxy(12,11);cout<<"Department ";
gets(emp.dept);

gotoxy(12,13);cout<<"Position ";
gets(emp.position);
gotoxy(12,15);cout<<"Rate ";
cin>>emp.rate;

employ<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<" "<<emp.rate<<endl;
gotoxy(12,18);cout<<" Do you want to continue [Y/N]? ";
cin>>ans;
if ((ans=='Y') || (ans=='y'))
{
continue;
}
else
{
break;
}
}
}
void head(fstream &file)
{
clrscr();
x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,1);cout<<"_";
x++;
}
gotoxy(34,2);cout<<"EDIT RECORDS";

x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,3);cout<<"_";
x++;
}
}
void line(int y)
{
x=1;
for(k-1;k<=75;k++)
{
gotoxy(x,y);cout<<"_";
x++;
}
}
void clearline()
{
gotoxy(22,9);clreol();
gotoxy(22,10);clreol();
gotoxy(22,11);clreol();
gotoxy(22,12);clreol();
gotoxy(10,15);clreol();
gotoxy(10,16);clreol();
gotoxy(10,17);clreol();
gotoxy(10,18);clreol();
gotoxy(10,19);clreol();
gotoxy(10,20);clreol();
}
void edit(fstream &file)
{
employ.open("employ.txt",ios::in);
out.open("temp.txt",ios::out);
gotoxy(10,5);cout<<"Enter employee number";
gets(empno);

while(!employ.eof())
{
employ>>emp.empno>>emp.name>>emp.dept>>emp.position>>emp.rate;

if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
gotoxy(22,9);cout<<"name"<<emp.name;
gotoxy(22,10);cout<<"Department"<<emp.dept;
gotoxy(22,11);cout<<"position"<<emp.position;
gotoxy(22,12);cout<<"rate"<<emp.rate;
line(14);

gotoxy(10,15);cout<<"Editthis record (y/n);";
sgt=getche();

if((sgt=='y') || (sgt=='Y'))
{
gotoxy(10,16);cout<<"Enter new name ";
gets(emp.name);
gotoxy(10,17);cout<<"Enter new department ";
gets(emp.dept);
gotoxy(10,18);cout<<"Enter new position ";
gets(emp.position);
gotoxy(10,19);cout<<"Enter new rate";
gets(emp.rate);

out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;

clearline();

gotoxy(22,10);cout<<"Your new record is ";
gotoxy(22,10);cout<<"name"<<emp.name;
gotoxy(22,11);cout<<"Department"<<emp.dept;
gotoxy(22,12);cout<<"position"<<emp.position;
gotoxy(22,13);cout<<"rate"<<emp.rate;
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
if (flag==0)
{
gotoxy(10,20);cout<<"Record does not exist";
}
employ.close();
out.close();
remove("employ.txt");
rename("temp.txt","employ.txt");
}

void view(fstream &file)
{
employ.open("employ.txt",ios::in);
if(employ.fail())
{
gotoxy(25,8);cout<<"Error reading input file";
cin.get();
cin.get();
exit(1);
}
k=6;

while(!employ.eof())
{
employ>>emp.empno;
strcpy(empno,emp.empno);
employ>>emp.name;
strcpy(name,emp.name);
employ>>emp.dept;
strcpy(dept,emp.dept);
employ>>emp.position;
strcpy(position,emp.position);
employ>>emp.rate;
strcpy(rate,emp.rate);

gotoxy(5,k);cout<<empno;
gotoxy(20,k);cout<<name;
gotoxy(36,k);cout<<dept;
gotoxy(53,k);cout<<position;
gotoxy(70,k);cout<<rate;

k++;
}
}
void head(fstream &file)
{
clrscr();
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,1);cprintf("_");
x++;
}
textbackground(BLUE);
textcolor(RED);
gotoxy(34,2);cprintf("SEARCH RECORDS ");
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,3);cprintf("_");
x++;
}
}
void line(int y)
{
x=1;
for(k=1;k<=80;k++)
{
textbackground(YELLOW);
textcolor(BLUE);
gotoxy(x,y);cprintf("-");
x++;
}
}
void search(fstream &file)
{
employ.open("employ.txt",ios::in);
textbackground(GREEN);
textcolor(BLUE);
gotoxy(10,5);cprintf("Enter employee number ");
gets(empno);
if(employ.fail())
{
cout<<"Error reading input file";

cin.get();
cin.get();
exit(1);
}
while (!employ.eof())
{
employ>>emp.empno;
if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
employ>>emp.name;
employ>>emp.dept;
employ>>emp.position;
employ>>emp.rate;
gotoxy(22,9);cout<<"Name "<<emp.name;
gotoxy(22,10);cout<<"Department "<<emp.dept;
gotoxy(22,11);cout<<"Position "<<emp.position;
gotoxy(22,12);cout<<"Rate "<<emp.rate;
line(14);
break;
}
else
{
flag=0;
}
}
if(flag==0)
{
gotoxy(12,16);cout<<"Record does not exist";
}

}
 
kulang ung una eto pla ung buo nid ko lagyan ng switch para sa add,edit,view,search help naman po kung pano langyan to ng switch
// add new employee
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<iomanip.h>
#include<string.h>

struct e
{
char empno[50];
char name[20];
char dept[15];
char position[20];
float rate;

};
struct e emp;
int k;
fstream employ;
char ans='y';
char empno[50],name[20],dept[15],position[20];
float rate;
void head();
void line(int y);
void search();
void add ();
void edit();
void view();

void add()
{
employ.open("employ.txt",ios::app);
if (employ.fail())
{
cout<<"Error wrutting to output file ";
cin.get();
cin.get();
exit(1);
}
while(ans)
{
clrscr();
for(k=1;k<=80;k++)
{
gotoxy(k,2);cout<<"-";
}
gotoxy(20,3);cout<<" ADD NEW EMPLOYEE RECORDS ";
for(k=1;k<=80;k++)
{
gotoxy(k,4);cout<<"-";
}

gotoxy(12,7);cout<<"Employee No. ";
gets(emp.empno);
gotoxy(12,9);cout<<"Employee Name ";
gets(emp.name);
gotoxy(12,11);cout<<"Department ";
gets(emp.dept);

gotoxy(12,13);cout<<"Position ";
gets(emp.position);
gotoxy(12,15);cout<<"Rate ";
cin>>emp.rate;

employ<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<" "<<emp.rate<<endl;
gotoxy(12,18);cout<<" Do you want to continue [Y/N]? ";
cin>>ans;
if ((ans=='Y') || (ans=='y'))
{
continue;
}
else
{
break;
}
}
}
void head()
{
clrscr();
x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,1);cout<<"_";
x++;
}
gotoxy(34,2);cout<<"EDIT RECORDS";

x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,3);cout<<"_";
x++;
}
}
void line(int y)
{
x=1;
for(k-1;k<=75;k++)
{
gotoxy(x,y);out<<"_";
x++;
}
}
void clearline()
{
gotoxy(22,9);clreol();
gotoxy(22,10);clreol();
gotoxy(22,11);clreol();
gotoxy(22,12);clreol();
gotoxy(10,15);clreol();
gotoxy(10,16);clreol();
gotoxy(10,17);clreol();
gotoxy(10,18);clreol();
gotoxy(10,19);clreol();
gotoxy(10,20);clreol();
}
void edit()
{
employ.open("employ.txt",ios::in);
out.open("temp.txt",ios::out);

gotoxy(10,5);cout<<"Enter employee number";
gets(empno);

while(!employ.eof())
{
employ>>emp.empno>>emp.name>>emp.dept>>emp.position>>emp.rate;

if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
gotoxy(22,9);cout<<"name"<<emp.name;
gotoxy(22,10);cout<<"Department"<<emp.dept;
gotoxy(22,11);cout<<"position"<<emp.position;
gotoxy(22,12);cout<<"rate"<<emp.rate;
line(14);

gotoxy(10,15);cout<<"Editthis record (y/n);";
sgt=getche();

if((sgt=='y') || (sgt=='Y'))
{
gotoxy(10,16);cout<<"Enter new name ";
gets(emp.name);
gotoxy(10,17);cout<<"Enter new department ";
gets(emp.dept);
gotoxy(10,18);cout<<"Enter new position ";
gets(emp.position);
gotoxy(10,19);cout<<"Enter new rate";
gets(emp.rate);

out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;

clearline();

gotoxy(22,10);cout<<"Your new record is ";
gotoxy(22,10);cout<<"name"<<emp.name;
gotoxy(22,11);cout<<"Department"<<emp.dept;
gotoxy(22,12);cout<<"position"<<emp.position;
gotoxy(22,13);cout<<"rate"<<emp.rate;
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
if (flag==0)
{
gotoxy(10,20);cout<<"Record does not exist";
}
emp;oy.close();
out.close();
remove("employ.txt");
rename("temp.txt","employ.txt");
}
void head()
{
clrscr();
for(k=1;k<=80;k++)
{
gotoxy(k,2);cout<<"_";
}
gotoxy(32,3);cout<<"LIST OF EMPLOYEE";
for (k=1;k<=80;k++)
{
gotoxy(k,4);cout<<"_";
}
gotoxy(5,5);cout<<"Employee No. ";
gotoxy(20,5);cout<<"Name ";
gotoxy(36,5);cout<<"Department ";
gotoxy(53,5);cout<<"Position ";
gotoxy(70,5);cout<<"Rate ";
}
void view()
{
employ.open("employ.txt",ios::in);
if(employ.fail())
{
gotoxy(25,8);cout<<"Error reading input file";
cin.get();
cin.get();
exit(1);
}
k=6;

while(!employ.eof())
{
employ>>emp.empno;
strcpy(empno,emp.empno);
employ>>emp.name;
strcpy(name,emp.name);
employ>>emp.dept;
strcpy(dept,emp.dept);
employ>>emp.position;
strcpy(position,emp.position);
employ>>emp.rate;
strcpy(rate,emp.rate);

gotoxy(5,k);cout<<empno;
gotoxy(20,k);cout<<name;
gotoxy(36,k);cout<<dept;
gotoxy(53,k);cout<<position;
gotoxy(70,k);cout<<rate;

k++;
}
}
void head()
{
clrscr();
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,1);cprintf("_");
x++;
}
textbackground(BLUE);
textcolor(RED);
gotoxy(34,2);cprintf("SEARCH RECORDS ");
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,3);cprintf("_");
x++;
}
}
void line(int y)
{
x=1;
for(k=1;k<=80;k++)
{
textbackground(YELLOW);
textcolor(BLUE);
gotoxy(x,y);cprintf("-");
x++;
}
}
void search()
{
employ.open("employ.txt",ios::in);
textbackground(GREEN);
textcolor(BLUE);
gotoxy(10,5);cprintf("Enter employee number ");
gets(empno);
if(employ.fail())
{
cout<<"Error reading input file";

cin.get();
cin.get();
exit(1);
}
while (!employ.eof())
{
employ>>emp.empno;
if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
employ>>emp.name;
employ>>emp.dept;
employ>>emp.position;
employ>>emp.rate;
gotoxy(22,9);cout<<"Name "<<emp.name;
gotoxy(22,10);cout<<"Department "<<emp.dept;
gotoxy(22,11);cout<<"Position "<<emp.position;
gotoxy(22,12);cout<<"Rate "<<emp.rate;
line(14);
break;
}
else
{
flag=0;
}
}
if(flag==0)
{
gotoxy(12,16);cout<<"Record does not exist";
}
emp;oy.close();
out.close();
remove("employ.txt");
rename("temp.txt","employ.txt");
}



}
 
pano lagyan ng switch tong program ko para sa add,edit,view,search
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<iomanip.h>
#include<string.h>

struct e
{
char empno[50];
char name[20];
char dept[15];
char position[20];
float rate;

};
struct e emp;
int k;
fstream employ;
char ans='y';
char empno[50],name[20],dept[15],position[20];
float rate;
void head();
void line(int y);
void search();
void add ();
void edit();
void view();

void add()
{
employ.open("employ.txt",ios::app);
if (employ.fail())
{
cout<<"Error wrutting to output file ";
cin.get();
cin.get();
exit(1);
}
while(ans)
{
clrscr();
for(k=1;k<=80;k++)
{
gotoxy(k,2);cout<<"-";
}
gotoxy(20,3);cout<<" ADD NEW EMPLOYEE RECORDS ";
for(k=1;k<=80;k++)
{
gotoxy(k,4);cout<<"-";
}

gotoxy(12,7);cout<<"Employee No. ";
gets(emp.empno);
gotoxy(12,9);cout<<"Employee Name ";
gets(emp.name);
gotoxy(12,11);cout<<"Department ";
gets(emp.dept);

gotoxy(12,13);cout<<"Position ";
gets(emp.position);
gotoxy(12,15);cout<<"Rate ";
cin>>emp.rate;

employ<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<" "<<emp.rate<<endl;
gotoxy(12,18);cout<<" Do you want to continue [Y/N]? ";
cin>>ans;
if ((ans=='Y') || (ans=='y'))
{
continue;
}
else
{
break;
}
}
}
void head()
{
clrscr();
x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,1);cout<<"_";
x++;
}
gotoxy(34,2);cout<<"EDIT RECORDS";

x=1;
for(k=1;k<=75;k++)
{
gotoxy(x,3);cout<<"_";
x++;
}
}
void line(int y)
{
x=1;
for(k-1;k<=75;k++)
{
gotoxy(x,y);out<<"_";
x++;
}
}
void clearline()
{
gotoxy(22,9);clreol();
gotoxy(22,10);clreol();
gotoxy(22,11);clreol();
gotoxy(22,12);clreol();
gotoxy(10,15);clreol();
gotoxy(10,16);clreol();
gotoxy(10,17);clreol();
gotoxy(10,18);clreol();
gotoxy(10,19);clreol();
gotoxy(10,20);clreol();
}
void edit()
{
employ.open("employ.txt",ios::in);
out.open("temp.txt",ios:ut);

gotoxy(10,5);cout<<"Enter employee number";
gets(empno);

while(!employ.eof())
{
employ>>emp.empno>>emp.name>>emp.dept>>emp.positio n>>emp.rate;

if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
gotoxy(22,9);cout<<"name"<<emp.name;
gotoxy(22,10);cout<<"Department"<<emp.dept;
gotoxy(22,11);cout<<"position"<<emp.position;
gotoxy(22,12);cout<<"rate"<<emp.rate;
line(14);

gotoxy(10,15);cout<<"Editthis record (y/n);";
sgt=getche();

if((sgt=='y') || (sgt=='Y'))
{
gotoxy(10,16);cout<<"Enter new name ";
gets(emp.name);
gotoxy(10,17);cout<<"Enter new department ";
gets(emp.dept);
gotoxy(10,18);cout<<"Enter new position ";
gets(emp.position);
gotoxy(10,19);cout<<"Enter new rate";
gets(emp.rate);

out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;

clearline();

gotoxy(22,10);cout<<"Your new record is ";
gotoxy(22,10);cout<<"name"<<emp.name;
gotoxy(22,11);cout<<"Department"<<emp.dept;
gotoxy(22,12);cout<<"position"<<emp.position;
gotoxy(22,13);cout<<"rate"<<emp.rate;
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
else
{
out<<emp.empno<<" "<<emp.name<<" "<<emp.dept<<" "<<emp.position<<""<<emp.rate<<endl;
}
}
if (flag==0)
{
gotoxy(10,20);cout<<"Record does not exist";
}
emp;oy.close();
out.close();
remove("employ.txt");
rename("temp.txt","employ.txt");
}
void head()
{
clrscr();
for(k=1;k<=80;k++)
{
gotoxy(k,2);cout<<"_";
}
gotoxy(32,3);cout<<"LIST OF EMPLOYEE";
for (k=1;k<=80;k++)
{
gotoxy(k,4);cout<<"_";
}
gotoxy(5,5);cout<<"Employee No. ";
gotoxy(20,5);cout<<"Name ";
gotoxy(36,5);cout<<"Department ";
gotoxy(53,5);cout<<"Position ";
gotoxy(70,5);cout<<"Rate ";
}
void view()
{
employ.open("employ.txt",ios::in);
if(employ.fail())
{
gotoxy(25,8);cout<<"Error reading input file";
cin.get();
cin.get();
exit(1);
}
k=6;

while(!employ.eof())
{
employ>>emp.empno;
strcpy(empno,emp.empno);
employ>>emp.name;
strcpy(name,emp.name);
employ>>emp.dept;
strcpy(dept,emp.dept);
employ>>emp.position;
strcpy(position,emp.position);
employ>>emp.rate;
strcpy(rate,emp.rate);

gotoxy(5,k);cout<<empno;
gotoxy(20,k);cout<<name;
gotoxy(36,k);cout<<dept;
gotoxy(53,k);cout<<position;
gotoxy(70,k);cout<<rate;

k++;
}
}
void head()
{
clrscr();
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,1);cprintf("_");
x++;
}
textbackground(BLUE);
textcolor(RED);
gotoxy(34,2);cprintf("SEARCH RECORDS ");
x=1;
for(k=1;k<=80;k++)
{
textbackground(BLUE);
textcolor(BLACK);
gotoxy(x,3);cprintf("_");
x++;
}
}
void line(int y)
{
x=1;
for(k=1;k<=80;k++)
{
textbackground(YELLOW);
textcolor(BLUE);
gotoxy(x,y);cprintf("-");
x++;
}
}
void search()
{
employ.open("employ.txt",ios::in);
textbackground(GREEN);
textcolor(BLUE);
gotoxy(10,5);cprintf("Enter employee number ");
gets(empno);
if(employ.fail())
{
cout<<"Error reading input file";

cin.get();
cin.get();
exit(1);
}
while (!employ.eof())
{
employ>>emp.empno;
if(strcmp(emp.empno,empno)==0)
{
flag=1;
line(7);
employ>>emp.name;
employ>>emp.dept;
employ>>emp.position;
employ>>emp.rate;
gotoxy(22,9);cout<<"Name "<<emp.name;
gotoxy(22,10);cout<<"Department "<<emp.dept;
gotoxy(22,11);cout<<"Position "<<emp.position;
gotoxy(22,12);cout<<"Rate "<<emp.rate;
line(14);
break;
}
else
{
flag=0;
}
}
if(flag==0)
{
gotoxy(12,16);cout<<"Record does not exist";
}
emp;oy.close();
out.close();
remove("employ.txt");
rename("temp.txt","employ.txt");
}



}
 
sir pa help aman sa program..bale ganto po un program
enter time in minutes:
tapos output nia magco2ount sya mula 0 sec. gang dun sa no of minute/hr un input mo..
ble example po
enter time in minutes:120
output nia count from 00:00:00to 02:00:00 (hr/min/sec)
 
Sir pahingi naman po ng simple enrollment system sa java...salamat po..
 
Back
Top Bottom