STIW5044 A172Q.pdf - STIW5044 Object-Oriented Programming...

This preview shows page 1 - 4 out of 12 pages.

STIW5044 Object-Oriented Programming Development1INSTRUCTION:AnswerALLquestions in the space provided.1.The following questions are about software decomposition:a)What is the main goal of software decomposition?(2 marks)b)ExplainTWO (2)reasons why decomposition is needed in constructing asoftware.(4 marks)
STIW5044 Object-Oriented Programming Development22.Based on the following Unified Modelling Language (UML) class diagram, write itscomplete class definition in Java.It has been given that the Monthly Fee is charged based on the types of membership(standard, VIP, or VVIP) as follows:Membership TypeStandardVIPVVIPMonthly FeeRM180RM250RM350(10 marks)Member-name : String-memberID: String-address: String-occupation: String-phone: String-membershipType: String-monthlyFee: double+ Member (String nm, String id, String address, Stringjob, String phone, String membershipType)+ calculate MonthlyFee(): void+ toString(): String
STIW5044 Object-Oriented Programming Development33.Specify and implement a standalone procedure to identify whether or not a number isan even number.(6 marks)4.Given below is a standalone procedure that returns the greatest common divisor oftwo numbers:a)Modify the specification of the procedure so that a concept of exception could

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 12 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture