Assessment Details and Submission Guidelines
Trimester T1 2018
Unit Code BN108/BN108D
Unit Title Programming for Networking
Assessment Type Individual
Title Programming fundamentals
Purpose of the assessment
Mapping) This assignment assesses the basic concepts of programming; students should be able to demonstrate their achievements in the following unit learning outcomes:
a. describe the fundamental principles of object-oriented programming;
b. interpret a user’s needs while dealing with simple program specifications;
c. design a simple class using UML notation;
d. create a simple application based on UML design and the incremental development process of coding, debugging, and testing;
e. apply basic control structures – sequence, repetition, and selection – to program development;
f. produce simple interactive applications.
Total Marks 20 marks
Word limit Not applicable
Due Date 9/05/2018 5:00PM
Submission Guidelines • All work must be submitted on Moodle by the due date along with a completed Assignment Cover Page.
• The assignment must be in MS Word format, 1.5 spacing, 11-pt Calibri (Body) font and 2 cm margins on all four sides of your page with appropriate section headings.
• Reference sources must be cited in the text of the report, and listed appropriately at the end in a reference list using IEEE referencing style.
Extension • If an extension of time to submit work is required, a Special Consideration Application must be submitted directly on AMS. You must submit this application three working days prior to the due date of the assignment.
Further information is available at:
• Academic Misconduct is a serious offence. Depending on the seriousness of the case, penalties can vary from a written warning or zero marks to exclusion from the course or rescinding the degree. Students should make themselves familiar with the full policy and procedure available at: http://www.mit.edu.au/about-mit/institute-publications/policiesprocedures-and-guidelines/Plagiarism-Academic-Misconduct-PolicyProcedure. For further information, please refer to the Academic Integrity Section in your Unit Description.
: Dr Javed Ali Baloch April
This assignment focuses on programming basics; expressions, variables, constants, static methods and loops.
John runs a cafe in the inner suburbs of Sydney. Due to the growing number of patrons, cafe has decided to take on extra casual employees. In order to manage payroll for his employees, John has decided to develop an employee payroll management system. Details of each employee to be maintained in the system will include; employee id, name, sex (M or F), date of birth, phone number, number of hours worked, hourly rate, gross pay, net pay, and income tax payable.
The gross pay is calculated as the number of hours worked multiplied by pay per hour while net pay is calculated as the difference between gross pay and income tax payable of which income tax payable is calculated by multiplying gross pay by an income tax rate of 20%.
For example, an employee who has worked a total of 30 hours with an hourly rate of $18 will have; gross pay=30*18=540 income tax payable=20%*540=108 net pay=540-108=432
Imagine you have been invited to develop this system, familiarise yourself with the problem description and complete the following tasks.
1. Develop a UML class diagram based on the problem description. The name of the class should be of the form MITnnnnnEmployee where MITnnnnn is your MIT ID.
a. Identify a constructor for the class
b. Identify all the attributes for the Employee class
c. Identify all the set and get methods for each of the attributes identified in 1.b
2. Write a Java implementation of the UML diagram defined in 1. In your class, include comments describing the function of the class, the name of the programmer and the date of implementation.
3. Write a Java program (driver class) named PayrollCalculator with a main method. Within the main method, you will create(instantiate) an object of your implementation class in 2, and other create methods for calculating wages for the employees. Include comments describing the function of the program, the name of the programmer and the date of implementation.
a. Declare all variables required for calculations as class variables.
b. Include static methods to calculate the gross pay, income tax payable and the net pay.
c. Once you have calculated the gross pay, income tax payable and net pay. Invoke the methods in correct order so that when your program executes, it should be able to produce an output as an employee’s pay slip like the example below.
John’s Cafe Ltd ABN:55135133
Pay Slip for: Jane Doe Payment Date: 20/05/2018
Pay Period from: 01/05/2018 to 15/05/2018 Gross Pay: $540.00 Net Pay: $432.00
Description Hours Worked Calculated Rate Type
Base Hourly @$18.00 30 $540.00 Wages PAYG Withholding $-108 Tax
1. Your assignment should include the following in the .ZIP archive:
• A Word document with the variables identified
• Java source code file for the class (.java file)
• Compiled file for the class (.class file)
2. Instructions for archiving and submitting your files:
• Create a folder and name it with your student ID (MITnnnnnn, where nnnnnn are digits of your student number)
• Copy your Word document, .java and .class files into that folder.
• Zip the folder.
i. Right-click on the folder ii. In the pop-up menu select Send-to, Compressed (zipped)Folder Marking criteria:
Description of criteria Marks
UML class design
Identify all the variables and their appropriate data types
Identify the set and get methods for the variables
Identify a constructor for the class
Java implementation (class) of the UML diagram
Comments describing the program, author and date
Class variables are correctly declared with the appropriate data types
Static method to compute the gross pay is correctly implemented
Static method to compute the income tax payable is correctly implemented
Static method to compute net pay is correctly implemented
Program runs and prints the correct output
Marking Rubric for Assignment #: Total Marks 20
Grade Mark HD
16-20 DI 14-16 CR 14-12 P 12-10 Fail
Excellent Very Good Good Satisfactory Unsatisfactory
UML class design
/5 All variables and their data types together with the associated methods are identified and represented in UML diagram UML class diagram is generally well annotated UML class
diagram is fairly annotated with some information missing UML class diagram is annotated but most of the information is missing No diagram or diagram provided is not relevant to the assignment topic.
/15 UML design is excellently implemented and the code is well documented. The program runs and outputs the correct results UML design
d with a few minor issues UML design is implemented but there some
issues with the implementatio n UML design is implemented but there are a number of issues Implementation
does not satisfy problem specification