برنامج لضيق الوقت
اتمنى بقية الاعضاؤ يساعدوكى سلااام
public class Empoloyee {
String ID ;
String Name ;
String Address;
String Phone ;
String Title ;
double Salary;
public Empoloyee() {
}
public Empoloyee(String ID , String Name , String Address ,String Phone , String Title ,double Salary )
{
this.ID=ID;
this.Name=Name;
this.Address=Address;
this.Phone=Phone;
this.Title=Title;
this.Salary=Salary;
} String getID(){
return ID; }
String getName(){
return Name; }
String getAddress(){
return Address; }
void setPhone (String p){ Phone = p;
}
void setTitle (String t){
Title = t; }
void setSalary (double s){
Salary = s;
}
void increaseSalary(double increaseRate){
if (increaseRate<=0 || increaseRate>1)
System.out.println ("Invalid Increase Rate");
else
Salary = Salary + increaseRate*Salary;
}
//public class Lab_5 {
public static void main(String[] args) {
// TODO, add your application code
System.out.println("Hello World!");
}}
//}import java.util.Scanner;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author XPPRESP3
*/
public class TestEmpoloyee {
public static void main(String []args){
Scanner input=new Scanner(System.in);
System.out.println("welcome to my program,");
System.out.println("please,enter your ID :::");
String id=input.next();
System.out.println("please,enter your name:::");
String name=input.next();
System.out.println("please,enter your address::");
String address=input.next();
System.out.println("please,enter your phone::");
String phone=input.next();
System.out.println("please,enter your title::");
String title=input.next();
System.out.println("please,enter your salsry::");
double salary=input.nextDouble();
Empoloyee e=new Empoloyee(id, name, address, phone, title, salary);
}
}


