469,903 Members | 2,071 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

I have Assignment

Assignment Objectives:
The objective of this assignment is to implement java programs with major object oriented concepts and applet with event handling.
Assignment Purposes
This assignment aims to
 Introduce practice problems to students to implement object oriented concepts and GUI programming by using Java programming language.
 Makes students to implement specific classes with relevant methods for a specific problem
 Test the understanding of java syntax for Applications and Applets
 Enhance the academic report writing skills of the student.
Learning Outcomes
On completion of this assignment, students will be able to:
1. Design, implement, test and document Java programs.
2. Implement Java applet with event handling
You are required to complete the following questions as per the requirement provided by the questions.
Question 1 : 5 Marks
Write a Java application which meets the following requirements:
1. In the application, you should declare a class called “Employee” with the following details:
Variable Name Description of variable
Employee No
Employee Name
Member Functions Description for Member Functions
Should initialize the values for the member variables EmpNo, ENname, EDesig, BSal, HRA .
Should calculate the Gross salary as the sum of the BSal and HRA
Should print the value of the instance variables along with Gross salary.
2. In your main method, create N number of Employee objects, where the value of N is obtained from the user and store the objects into an array.
3. Use appropriate methods to read the values of the Employee objects from user, Calculate the Gross Salary for each Employee and print employee details and salary details of all objects created.
4. Use exception handling appropriately.
5. Use comments to illustrate the various concepts applied / utilized in the solution.
6. Ensure the use of meaningful variable names, consistent indentation of program code
Question 2: 5 Marks
Create a JAVA applet program that accepts and displays object’s details on respective GUI components. The Applet consists of seven GUI components such as two labels Name and age followed by two textfields of size 10 respectively. There are two buttons labeled as ADD and DISPLAY followed by a Textarea. The values entered by the user on the text fields are that of two instance variables of a class with name Person and the individual object details are to be stored on an array of type Pesron upon the pressing of ADD button. Users are allowed to add 5 object’s details and while pressing the DISPLAY button, the values of all the five objects are displaying on the Text Area.
Note: Person class should be created with two instance variables and a constructor to initialize the values. Use comments to illustrate the various concepts applied / utilized in the solution.
Dec 22 '09 #1
1 2713
151 Expert 100+
I have an assignment
Good luck with it!

The article on how to start may help.

The assignment itself is very directed and I would suggest working one very small step at a time. At each step make sure your code compiles, runs and does what you expect. If any of these three things fail then you have a question to ask ("what does this compiler message mean?" "why do I get the following runtime error?" "why does the program do this when I expected it to do that?").

If you do decide to ask a question remember to post code so that everyone knows what it is you're asking. Complete and exact compiler and runtime output are very helpful too.

Good luck again!
Dec 22 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

23 posts views Thread by Paul Rubin | last post: by
10 posts views Thread by Andrew Koenig | last post: by
16 posts views Thread by Edward Diener | last post: by
9 posts views Thread by Rick N. Backer | last post: by
1 post views Thread by Jon Slaughter | last post: by
166 posts views Thread by Graham | last post: by
6 posts views Thread by Neil Zanella | last post: by
20 posts views Thread by TimeHorse | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.