Foundations of Programming

FIT9017: Week 10

Week 10’s lecture by Judy started with an example of why code format convention are important if software is to be supported, extended, corrected, maintained, ported, adapted and re-used.

The focus then turned to 2 code important concepts of code quality:

  • Cohesion – Each component must contained related and well defined task, high cohesion is good.
  • Coupling – Each component must rely on as little data from other components as possible, low coupling is good.
    • Explicit Coupling – public Room northExit; (public fields should be changed to private and accessor/mutator methods added
    • Implicit Coupling – Call get/display methods instead of have 2 hard coded copies of information used in more than one class.
    • Not included was an explanation of normal coupling where a constuctor/mutator needs parameters.

Finally we covered some java commands from prompts for compiling and running:

  • compile:  javac
  • run: java class1
  • run jar: java -jar somthing.jar

We submitted our class diagrams and test strategies for Assignment 2 in the tutorial. I am lacking some understanding of the requirements for the test plan and how to present it so I will have to review this… there is not much info in the text book or lecture slides.

Leave a Reply

Your email address will not be published. Required fields are marked *