Java basic question...

Ads
 

Java basic question...

  1. Design a Java Application project for maintaining Employee Information in a company. Follow the instructions below for further details.

(i) Create a class named EmpDetails.

(ii) Declare variables empname as String (To hold employee name), empid as Integer (To hold employee id), emp_desig as String (To hold designation of the employee) and basic as Integer (To hold the basic salary of the employee).

(iii) Define and declare a method named read_data( ) that reads the name, id, designation and basic salary of the employees from the user.

(iv) Define and declare a method named salary( ) that calculates the gross salary of all the employees from the basic salary. (Gross Salary = Basic Salary ?? EPF ?? Socso where EPF is 11% of Basic Salary and Socso is 1% of Basic Salary)

(v) Define and declare a method named show_data( ) that prints the name, id, designation and gross salary of all the employees to the user.

(vi) The program should enable the user to have the database of atleast 25 employees.

(vii) Create another class named Employee and declare the main( ) method in it.

(viii) Create object for EmpDetails in the main( ) method and use the same to access the methods.

(ix) Present the output in a table neatly.

View Answers

May 15, 2012 at 12:10 PM

(iv) Define and declare a method named salary( ) that calculates the gross salary of all the employees from the basic salary. (Gross Salary = Basic Salary - EPF - Socso where EPF is 11% of Basic Salary and Socso is 1% of Basic Salary)

Ads









Related Tutorials/Questions & Answers:
Java basic question...
Java basic question...   Design a Java Application project...), emp_desig as String (To hold designation of the employee) and basic as Integer (To hold the basic salary of the employee). (iii) Define and declare a method
basic question
basic question  how we create a new table with the same structure and data of another table
Advertisements
java basic
java basic  Java Basics tutorials
java basic
java basic  java program for finding LCM and HCF
java basic
java basic  write java program to evaluate 1+x^2+x^3+x^4+............+x^n
Java basic
Java basic  How can I Use Eclipse to create a project and write a hello world java application
basic java - Java Beginners
basic java  oops concept in java ?  Hi Friend, Please visit the following links: http://www.roseindia.net/java/beginners/oop-in-java.shtml http://www.roseindia.net/java/learn-java-in-a-day/oops.shtml Thanks
java core basic problem
java core basic problem  my question is: write a program that illustrates interface inheritance. interface P is extended by P1 and P2. interface... methode. class Q impliments P12 Instantiate Q and invoke each of its methods.Each
java core basic problem
java core basic problem  my question is: write a program that illustrates interface inheritance. interface P is extended by P1 and P2. interface... methode. class Q impliments P12 Instantiate Q and invoke each of its methods.Each
Basic Java Tutorial
Basic Java Tutorial  Hi, Where is the url of Basic Java Tutorials on roseindia.net? Thanks   Hi, You can Learn Java in a Day also? Thanks
java and visual basic
java and visual basic  Hello, Please how does java and visual basic interact or talk
BASIC Java - Java Tutorials
Basic Java Syntax This tutorial guide you about the basic syntax of the java... of the java which is applicable to all java program : Case Sensitive Java Java... letter and lover case. For example, case and Case are different words in java
Question in Java ??
Question in Java ??   Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number squrfoot
Question in Java ??
Question in Java ??  Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number 0 ,2, . . . ,18,20 squrfoot 00000 1.4142 5.2426 5.4721
Question in Java ??
Question in Java ??  Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number 0 ,2, . . . ,18,20 squrfoot 00000 1.4142 5.2426 5.4721
Question Java>?
Question Java>?  **ï??· Create a new class called Bank and in the main method use class Account (lab 4) to create an array of 10 accounts. ï??· Enter data for all accounts (account number,name, balance). ï??· Add
java question :)
java question :)  write java program to use vector in ArrayList with add, remove,sort   import java.util.Vector; public class... Element MUAYAD"); vc.add("Vector Element JAVA"); vc.add("Vector Element
java question
java question   Create a class called Complex to perform arithmetic operations with complex numbers. 1- Use double variables to represent the fields of the class. 2- Provide a no-argument constructor with default values in case
java question
java question  the purpose of defining multiple constructor in java
java question
java question  find the 127 twin pair in java
JAVA QUESTION
JAVA QUESTION  How to view image on Frame in swing(or)awt in Java
JAVA QUESTION
JAVA QUESTION  How to view image on Frame in swing(or)awt in Java
JAVA QUESTION
JAVA QUESTION  How to view image on Frame in swing(or)awt in Java
java question
java question  what is the difference between path and classpath in java
top 20 basic programm of java
top 20 basic programm of java  what is the top 20 rule to learn the basic of java.   Learn Java through the following links: http://www.roseindia.net/java/ http://www.roseindia.net/java/beginners/index.shtml
java question
java question  How to find the longest and shortest line from the file in case of java and java program should read the filename from the keyboard
java question
java question  Please, give me sample program for insert Audio(sound) on Frame in swing in java
java question
java question  how to write a java program that, given a friend name , display the phone number and the email address for that friend
java question
java question  anyone provide the code to call c++ function from java   Here you will find details how to implement the c++ into the java. http://www.javaworld.com/javatips/jw-javatip23.html
Java Question
Java Question  can u give me one expample in which conditions we... in java includes only abstract methods i.e. methods have signatures only (or we... in java defines that it must be implemented by any class to make use of it. One
java question
java question  input any number and check if sum of alternate digit is palindrome

Ads