I have Assignment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khalfan
    New Member
    • Dec 2009
    • 2

    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
    Tasks
    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
    EmpNo
    Employee No
    EName
    Employee Name
    EDesig
    EmployeeDesigna tion
    BSal
    BasicSalary
    HRA
    HouseRentAllowa nce
    Member Functions Description for Member Functions
    getValues()
    Should initialize the values for the member variables EmpNo, ENname, EDesig, BSal, HRA .
    CalculateSalary ()
    Should calculate the Gross salary as the sum of the BSal and HRA
    DisplayValues()
    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.
  • pbrockway2
    Recognized Expert New Member
    • Nov 2007
    • 151

    #2
    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!

    Comment

    Working...