Categories
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 class1.java
  • 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.

Categories
Computer Technologies and O/S

FIT9018: Week 10

Week 10’s lecture was a continuation from Week 9’s introduction to shell scripting. The tutorial this week was closely correlated to the lecture material for weeks 9 and 10.

Ubuntu Shell

Pearl of the Week: Test function in shell scripts. + /dev/null (trash bin for script outputs)

if [ $var1 = $var2 ]
then
echo var1 and var2 are the same
else
echo var1 and var2 are different
fi

We had a chance to make some scripts based on the constructs and operators that we learnt from the lecture:

[To be uploaded]

A basic but detailed guide to shell scripting: http://www.freeos.com/guides/lsst/

An advanced guide to shell scripting:  http://tldp.org/LDP/abs/html/