You are on page 1of 1

Assignment 1 : Submission date: 25 October 2013 Instruction: This is a group assignment (maximum of 4 members) Do All question 1, 2 and 3 and

one test class of each class. Question 4 consist of the inheritance relationship between GeometricObject, Octagon and Square. Write the java code for all the classes and ONE test class.
Question 1 UML and coding, constructor,Accessor and mutator method Draw a UML class diagram and convert it to java code. A Name class that contains 3 private String data members of first name, middle name and last name. A three-args constructor Accessor and mutator method A getFullName() method that return a String datatype. A test class class with data firstname=ali middle=bin lastname = abu. Question 2 UML and coding, constructor,Accessor and mutator method Draw a UML class diagram and convert it to java code. An Address class that contains 4 private String data members of street, city, state and postcode. A four-args constructor Accessor and mutator method A getFullAdress() method that return a String data type. A test class with data street= 1016 Jl Sultan Ismail, city=KL, state =WP KL, postcode=520520. Question 3 UML and coding, constructor,Accessor and mutator method Draw a UML class diagram and convert it to java code. An Loan class that contains 4 private data members of annualInterestRate, numberOfYears, loanAmount, and loandate (identify suitable data type). A three-args constructor (loandate datamember within(inside) the constructor) Accessor and mutator method A calculateMonthlyPayment() method . A calculateTotalPayment() method .

Question 4 GeometricObject

Square Octagon

You might also like