hsc course noteshsc software design & development course notes adam stiskala page 5 of 26 •...

26
HSC Software Design & Development Course Notes Adam Stiskala Page 1 of 26 Software Design & Development HSC Course Notes By Adam Stiskala Hurlstone Agricultural High School, 2004 www.adam.stiskala.id.au [email protected] * Bold points are syllabus dot points.

Upload: others

Post on 16-Nov-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 1 of 26

Software Design & Development

HSC Course Notes

By Adam Stiskala Hurlstone Agricultural High School, 2004

www.adam.stiskala.id.au [email protected]

* Bold points are syllabus dot points.

Page 2: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 2 of 26

Table of Contents9.1 – Development and Impact of Software Solutions........................................................................................... 2

9.1.1 – Social and Ethical Issues ........................................................................................................................2 Rights and Responsibilities of Software Developers ..................................................................................... 2 Software Privacy and Copyright .................................................................................................................... 2 The Software Market......................................................................................................................................2 Significant Social and Ethical Issues.............................................................................................................. 2

9.1.2 – Application of Software Development Approaches............................................................................... 2 Software Development Approaches ............................................................................................................... 2

9.2 – Software Development Cycle........................................................................................................................ 2 9.2.1 – Defining and Understanding the Problem .............................................................................................. 2

Defining the Problem .....................................................................................................................................2 Design Specifications ..................................................................................................................................... 2 Modelling ....................................................................................................................................................... 2 Communication Issues.................................................................................................................................... 2

9.2.2 – Planning and Design of Software Solutions........................................................................................... 2 Standard Algorithms for Searching and Sorting ............................................................................................ 2 Custom-Designed Logic Used In Software Solutions.................................................................................... 2 Standard Modules (Library Routines) Used In Software Solutions............................................................... 2 Customisation of Existing Software Solutions............................................................................................... 2 Documentation of the Overall Software Solution .......................................................................................... 2

9.2.3 – Implementation of Software Solution .................................................................................................... 2 Interface Design in Software Solutions.......................................................................................................... 2 Language Syntax Required for Software Solutions ....................................................................................... 2 The Role of the CPU in the Operation of Software........................................................................................ 2 Translation Methods in Software Solutions ................................................................................................... 2 Program Development Techniques in Software Solutions............................................................................. 2 Documentation of a Software Solution .......................................................................................................... 2 Hardware Environment to Enable Implementation of the Software Solutions .............................................. 2 Emerging Technologies.................................................................................................................................. 2

9.2.4 – Testing and Evaluation of Software Solutions ....................................................................................... 2 Testing the Software Solution ........................................................................................................................ 2 Reporting on the Testing Process ................................................................................................................... 2

9.2.5 – Maintenance of Software Solutions........................................................................................................ 2 Modification of Code to Meet Changed Requirements.................................................................................. 2 Documentation of Changes ............................................................................................................................ 2

9.3 – Developing a Solution Package..................................................................................................................... 2 Designing and Developing a Software Solution to a Complex Problem ....................................................... 2 Systems Implementation ................................................................................................................................ 2

9.4 – Options .......................................................................................................................................................... 2 9.4.1 – Option 1: Evolution of Programming Languages .................................................................................. 2

Historical Reasons for the Development of the Different Paradigms ............................................................ 2 Basic Building Blocks ....................................................................................................................................2 Effect on Programmers’ Productivity............................................................................................................. 2 Paradigm Specific Concepts........................................................................................................................... 2

Page 3: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 3 of 26

9.1 – Development and Impact of Software Solutions

9.1.1 – Social and Ethical Issues

Rights and Responsibilities of Software Developers • Authorship

o Everyone who participates in developing the solution has authorship rights. o Publishers must ensure that all authors are acknowledged.

• Reliability o When the software does what it is supposed to do without fault. o Unreliable software could be caused by:

� Logic errors in the code � Incompatibility with the operating system

• Developers have a responsibility to ensure that their software interfaces correctly with the operating system.

• Software should not make changes to the operating system settings. � Incompatibility with the hardware

• The vast amounts of hardware available today makes developing software more difficult. • Software must be testing with a large range amount of different hardware or limited to

“compatibility” with only a set amount of hardware. � Incompatibility with other software

• The developer must ensure as far as possible that other software doesn’t interfere with their product and that their product does not interfere with others.

� Runtime errors • Errors which occur when the program is run. • Includes division by zero and accessing incorrect memory locations.

• Quality o Final quality of the product must meet with user’s expectations. o Quality assurance is used to ensure the quality of the product.

• Response to problems o Developers have the responsibility to respond to problems quickly and efficiently. o Levels of problems that exists are:

� Critical – Financial loss (Immediate resolution) � Major – Affects operation but difficult workaround available (3 months resolution) � Normal – Affects operation but workaround available (6 months resolution) � Cosmetic – Does not affect operation of software (As time constraints allow)

• Code of conduct o A code of conduct is in place to ensure that developers comply to these responsibilities. o It is advantageous for developers to comply to a code of conduct as it increases their appeal to

prospective clients. • Viruses

o Developers must ensure that they do not include any viruses in their software. o Regular use of virus scanners is recommended.

Software Privacy and Copyright • Concepts associated with piracy and copyright, including:

o Intellectual property � Defined as something that belongs to your mind or intellect. � Includes:

• Patents • Trade marks • Copyright

o Plagiarism � Procreating or imitating another person’s ideas in a manner which claims that they are your own.

o Shareware � Software that you can acquire a licence for to use for free under certain conditions. � The licence often specifies that the software may be distrusted freely by the user.

Page 4: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 4 of 26

o Public domain � Software that can be distributed freely as long as the distribution is not for profit. � The copyright holder relinquishes all rights to the software.

o Ownership versus licensing � Purchasing software usually does not give you ownership – only a licence to use the program

under certain terms. o Copyright laws

� Laws are in place to safeguard the legal rights of authors. � Economic incentive is provided for creative activity, promoting the progress of creative

endeavour. o Reverse/backwards engineering

� Examining an existing system in order to create a similar system or to be able to interface with that system.

o Decompilation � The process of converting machine executable object code back into source code.

o License conditions � Vary depending on the type of software developed. � Types of licences include:

• Public domain • GPL • Shareware • Site licences

o Network use � Sometimes it is permissible that executable code is stored on a server and another machine

accessing the program. � Additional licences would have to be purchased if more than one machine was using the program

at a time, these are called concurrent use licences. • Various national perspectives to software piracy and copyright laws

o It has been estimated that 30-40% of all software worldwide has been illegally copied. o US$11 billion is lost each year due to pirated software, about AU$290 million in Australia alone.

• The relationship between copyright laws and software license agreements o Copyright does not require any formal registration for it to apply, it is granted automatically. o Software licence agreements are used to create a binding contract between the purchaser and the software

developer, they often contain clauses relating specifically to copyright.

The Software Market • Maintaining market position

o For software companies to maintain market position they must consider many social and ethical issues when developing their marketing techniques. These include the four P’s:

� Product • The expectations of consumers must be realised in the actual product.

� Place • The product must be sold in the correct place in order to reach the intended audience. • Examples:

o Shop fronts o Industry specific distributors o Direct sales

� Price • Cost-plus pricing

o Determining the cost of the product and adding a margin. • Consumer-based pricing

o Determining what the consumer wants and how much they want to pay for it. � Promotion

• Ways of persuading people to buy products and services. • Methods of promotion include:

o Advertising o Word of mouth

Page 5: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 5 of 26

• The effect on the marketplace o A product’s effect on the marketplace is determined by:

� Whether the product is innovative or well established. � Whether the product is challenging market leaders. � Whether the product follows market leaders, attempting to obtain a portion of their share. � Whether the product focuses on niche, specialised areas of the market.

Significant Social and Ethical Issues • National and international legal action resulting from software development

o Microsoft vs. Apple o Government vs. software companies

• Public issues, including: o The year 2000 problem

� In the 1960s and 1970s software was designed using only 2 digits to represent the year in order to save space.

� It became apparent that many applications would not be able to cope with the rollover from 1999 to 2000 and it was anticipated that many computer-based systems would fail.

o Computer viruses � Many computer viruses are created around the world every day. � Many are just annoying, but some have the capability to destroy important data.

o Reliance on software � Many day to day aspects of our lives rely on software in order to operate. � Examples include:

• Motorised transport • Electricity supply • Operation of government authorities

� The software industry is responsible to ensure all of software operates their functions correctly and accurately.

Page 6: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 6 of 26

9.1.2 – Application of Software Development Approach es

Software Development Approaches • Approaches used in commercial systems, including:

o The structured approach � Clearly defined steps throughout the software development process. � You cannot proceed onto the next step until the current one is completed. � After the conclusion of each step you cannot go back and make alterations – the entire process

would have to be restarted. � Most common approach to software development. � The steps to the process are:

• Defining and understanding the problem • Planning and design • Implementation • Testing and evaluation • Maintenance

� Used mainly in large scale, high budget projects. o Prototyping

� Design by creating and refining a prototype through user feedback. � Higher amount of interaction with user. � Used mainly in smaller scale, low budget projects. � Rapid development time. � Improved communication with the end user.

o Rapid applications development � Sequential process aided greatly through the use of CASE tools. � Lack of formal stages, but the following phases are usually used:

• Business, data and process modelling • Application generation • Testing and turnover

� Heavily focussed on the reuse of code. � Requires constant communication between developers and the end users. � Sometimes implements the modification of COTS (Customised Off-The-Shelf packages).

o End user development � When the person who is going to be operating the software develops it themselves. � Lack of formal stages. � Small scale and low budget. � Often involves the modification of COTS (Customised Off-The-Shelf packages).

o Combinations of any of the above � Some aspects of a solution may lend themselves to one development approach over the other. � This may lead to a combination of development approaches being used to create a solution.

• Methods of implementation o Direct cut over

� Complete and immediate conversion to the new system. � All data in the old system will need to be converted to work with the new system. � If the new system fails, the old system is not available as a backup. � Cheapest and quickest method of implementation.

o Parallel � Running the old and new system simultaneously over a period of time. � All operations of the new system duplicate similar operations in the old system. � If the new system fails, the old one can still be used with minimal loss. � Creates additional workloads and costs more to run two systems at once.

o Phased � Involves the gradual implementation of the new system for certain operations while the old

system is still used for other operations. � Allows each new module to be tested individually. � If a module fails, the whole system is not affected.

o Pilot � A single copy of the new system is fully implemented and tested. � Once the system is proved, another implementation method (usually direct cut over) is used to

implement the rest of the system.

Page 7: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 7 of 26

• Current trends in software development, for example: o Outsourcing

� Contracting work to outside developers, often specialists in their field. � Some reasons that companies outsource:

• Better response to change. • Reducing control costs. • Higher quality results. • Free internal resources. • Resources not available internally. • Access to new technology. • Faster development times.

� Disadvantages of outsourcing include: • Increased dependence on third parties. • Lack of control over outsourced departments.

o Popular approaches � Moved from being process oriented to data oriented and object oriented. � Data oriented involves the use of logical and abstract data types. � Object oriented allows data abstraction, encapsulation and inheritance as well as easily

accommodates code reuse. � Increased usage of CASE tools to aid development.

o Popular languages � Majority of code is still written in 3rd generation languages. � Growing use of 4th generation languages. � Languages like Visual Basic, Visual C++ and Delphi which increase programmer productivity.

o Employment trends � Greater number of jobs going to programmers with a knowledge of object oriented languages. � Move towards contract based work and outsourcing rather than full time employment.

o Networked software � Networks of computers, especially the Internet have created a new and growing environment for

software development. � Software applications can be shared amongst users is the following ways:

• Mainframe computers where slices of time are allocated to each terminal to execute programs on the mainframe’s processors.

• Computers linked together to enable sharing of software, data, and peripheral devices. • Client/server applications where many clients access and manipulate a central database.

o Customised off-the-shelf packages � Software that can be purchased and modified to suit particular needs. � Examples include Microsoft Office for desktop publishing and MYOB for accounting. � Increasing in popularity in programming industry as they are usually:

• Cost effective • High quality and reliable • Upgradeable

• Use of CASE tools and their application in large systems development o Software versions

� Allows teams of developers to collaborate and track the changes made to a program. � Old versions can be easily restored if necessary.

o Data dictionary � Used to identify and fully define data, data characteristics and data relationships. � CASE tools combine graphics tools and the data dictionary to provide design & development

tools for programmers. o Test data

� CASE tools can be used to generate test data for testing a coded solution. � Used to test many/all of the possible data paths. � CASE tools are available which automatically acquire data to be used, analyse the source code

and simulate hardware. They will then generated a report and list the tested and untested data paths and their success.

o Production of documentation � Many CASE tools can be used for the creation of both internal and external documentation. � CASE tools are available for the creation of diagrams in the planning & designing phase. � CASE tools are also available to generate both online and offline user manuals.

Page 8: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 8 of 26

9.2 – Software Development Cycle

9.2.1 – Defining and Understanding the Problem

Defining the Problem • Identifying the problem

o Needs � An instance in which some necessity or want exists. � Some solution is required to meet the need. � Without defining the need it is difficult to develop a clear picture of the problem to be solved. � Ways to determine and analyse customer needs:

• Observation (simple observation of current systems and its use can help programmers understand about how a new system can be implemented).

• Participant observation (first hand observation of how the system is run through participation in day to day operations).

• Surveys (surveying managers, IT personnel, users and clients). • Interviews (allows participants to more freely express their opinions, however can be

quite time consuming). • Focus groups (similar to interview, but saves time and therefore money). • Time management studies (determining how much time is actually spent on each specific

function). • Business analysis (examining different aspects of business activities and finding ways to

improve them). • Reading documentation (read the documentation for the current system to learn about its

operation). • Industrial trends (assess trends in technology usage and equipment design).

o Objectives � What you are aiming to specifically achieve. � Often described as measurable goals. � Both your short and long term aims. � Gives the direction of the project. � Up to the software developer to clarify what they are trying to achieve. � Should be continually examined to ensure their fulfilment.

o Boundaries � Define the limits of a system. � Prevents feature creep – the continual and uncontrolled expansion of a program’s role. � Up to the software developer to determine the clear boundaries of their project. � Important to take into account constraints that may impact upon the project being completed.

• Determining the feasibility of the solution o Is it worth solving?

� A preliminary investigation into whether a problem can be solved or whether it will be worth the time, effort and money involved to the organisation.

� Some points to consider when evaluating a system’s worth: • Would the existing system be able to perform the required tasks by aid of a quick fix or

patch? • Would the proposed system meet future needs? • Have existing similar solutions been examined? • How crucial is the new system to the organisation?

o Constraints � Features that will constrict or inhibit the development of a solution. � Some constraints to a project are:

• Budgetary o Whether the solution to the problem is affordable. o Whether the benefit from the solution is worth the cost. o Factor in any recurring costs.

• Operational o Whether a solution will be useable by the target customers. o Users must be able to effectively operate the system. o Costs of training users must be factored into the cost/benefit study.

Page 9: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 9 of 26

• Technical o What hardware and software is currently being used? o Can this hardware be used with the software to build a workable solution? o How much will it cost to upgrade hardware? o Is the hardware needed acquirable?

• Scheduling o The time frame in which a solution must be developed. o Is the solution achievable within the set time frame?

o Possible alternatives � Once determining feasibility, a decision must be made as to whether the solution is to be

implemented. � If it is not feasible, the software developer may choose to explore alternative solutions to the

problem. o Social and ethical considerations

� Will the new system impact on the jobs of current employees? � Will the software be open to misuse? � Will features that provide wider accessibility need to be implemented?

Design Specifications • The developer’s perspective in consideration of:

o Data types � A way of describing particular data terms. � Simple data types – available in nearly all programming languages:

• Integer (whole numbers only). • Real/floating point (positive/negative numbers with decimal places). • Character (any alphanumeric character or symbol). • Boolean (0/1, true/false, yes/no, etc.).

� Structured data types – combining simple data types into related groups: • String (an array of characters used to form words). • One-dimensional array (data of the same type accessed by index). • Multi-dimensional array (data of the same type accessed by co-ordinate). • Simple record (data of different types in no structured order). • Array of records (data of different types accessed by index/co-ordinate). • Files

o Sequential o Relative

o Algorithms � A serious of procedural steps that will result in the solution of a specific problem. � Can be described in a number of different ways – most commonly by pseudocode and flowcharts. � Three basic control structures govern the logic flow in an algorithm or program, they are:

• Sequence – A -> B • Selection – A -> (B OR C) • Repetition – A -> B -> A

o Variables � Pointers to an area in memory that is used by a program to store data. � Must be declared as a specific data type with a unique variable name.

• The user’s perspective o The user is focussed on solving a particular task or problem and is not overly concerned about how the

program goes about doing it. o The user knows what the program does, but does not know how – this is called the “black box” concept.

Modelling • Representing a system using diagrams, including:

o Input process output (IPO) diagrams � Used to describe data entering a process, how it is manipulated and the resultant output data.

Page 10: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 10 of 26

o Storyboards � Used to show the screens in a project and the navigation between them.

o Data flow diagrams � Describe the path data flows through a system. � No attempt is made to indicate the timing of events. � Used for both system analysis and system design.

o Systems flowchart � Used to describe logic and flow of data (see book for symbols used)

o Screen designs � Made so as to consider item placement, consisting design, order, grouping and nature screen

elements, use colour, graphics, fonts. o Consideration of use of a limited prototype

� Allows the user to give feedback about the program’s design before it is actually made. � Gives the user an idea of how the final program will look and function.

Communication Issues • The need to empower the user

o It is important to include the user in the software development process. • The need to acknowledge the user’s perspective

o The user is not interested in how the task is achieved but more so in the finished product. o The use requires that the software is good quality and performs all the tasks specified.

• Enabling and accepting feedback o The software developer must communicate regularly with the sure to ensure the solution meets the user’s

needs. o Developing a prototype may aid ensuring the solution meets specifications.

Page 11: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 11 of 26

9.2.2 – Planning and Design of Software Solutions

Standard Algorithms for Searching and Sorting • Approaches used in commercial systems, including:

o Finding minimum and maximum values in arrays � BEGIN FindMinMax

max = theArray[0] min = theArray[0] index = 1 while index < array.length if theArray[index] > max then max = theArray[index] endif if theArray[index] < min then min = theArray[index] endif increment index endwhile display “The highest number is:” ‘max’ display “The lowest number is:” ‘min’ END FindMinMax

o Processing strings � Extracting

• The original string is not altered in the process, instead a second string is created using a section of the original.

• BEGIN ExtractString(start,length,array) index = start while index < start + length temp = temp + array(index) index = index + 1 endwhile ExtractString = temp END ExtractString

� Inserting • A new string is inserted into a specific place in the original string. • BEGIN InsertString(start,newData,array)

temp = ExtractString (1,start - 1,array) + newData temp = temp + ExtractString (start,array.length,data) InsertString = temp END InsertString

� Deleting • Removing a section of a string. • BEGIN DeleteString(start,length,array)

temp = ExtractString (1,start - 1,array) temp = temp + ExtractString (start + length + 1,array.length,array) DeleteString = temp END DeleteString

o File processing (including sentinel values) � Files are a collection of data stored on a secondary storage device. � Files are often terminated by special symbols called sentinel values, often “eof”.

o Linear search � Simplest searching algorithm. � Highly inefficient, especially with large arrays. � Array can be sorted or unsorted. � Compare search item with every other item in the array until either the item is found or the end of

the list is reached. • BEGIN LinearSearch

get searchItem index = 0 while (index < array.length) do if array[index] = searchItem then display “Item found at position “ ‘index’ “.” found = TRUE endif index = index + 1 endwhile if found <> TRUE then display “Item not found in list.” endif END LinearSearch

Page 12: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 12 of 26

o Binary search � Very efficient search even with large arrays as the array is already sorted. � Continually cuts the array in half until the item is found or it is determined the item is not in the

list. � BEGIN BinarySearch

low = 0 high = array.length found = FALSE get searchItem while (high > low) AND (found <> TRUE) do mid = (high + low) / 2 if searchItem < array[mid] then high = mid - 1 elseif searchItem = array[mid] then found = TRUE else low = mid + 1 endif endwhile if found = true then display “Found.” else display “Not Found.” endif END BinarySearch

o Bubble sort � Each element is compared with the element next to it and if they are out of order they are

swapped. � Elements end up “bubbling” towards their correct location in the array. � BEGIN BubbleSort

end = array.length while end > 1 index = 1 while index < end if array[index] > array[index + 1] then Swap (index,index + 1) endif index = index + 1 endwhile end = end – 1 endwhile END BubbleSort

o Insertion sort � Scanning forward until an out of place item is found and then scan backward until you find its

correct location and insert it there. � BEGIN InsertionSort

index = 2 while index < array.length hole = array[index] test = index - 1 found = FALSE while (test >= 1) and (found <> TRUE) do if hole < array[test] then array[test + 1] = array[test] test = test + 1 if test = 0 found = TRUE endif else found = TRUE endif endwhile array[test + 1] = hole index = index + 1 endwhile

END InsertionSort

Page 13: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 13 of 26

o Selection sort � Scanning through the array to find the largest unsorted item and then selecting it and swapping it

with the item in its correct position. � BEGIN SelectionSort

endUnsorted = array.length while endUnsorted > 1 index = 1 largest = array[current] largestPosition = current while index < endUnsorted index = index + 1 if array[index] > largest then largest = array[index] largestPosition = index endif endwhile Swap (largestPosition,endUnsorted) endUnsorted = endUnsorted – 1 endwhile END SelectionSort

Custom-Designed Logic Used In Software Solutions • Requirements to generate these include:

o Identification of inputs, processes and outputs � Software developer must describe the data, its format and its method of input or output. � IPO diagrams are useful to show the relationship between inputs, the processes carried out and

the outputs. o Representation as an algorithm

� Algorithms clearly describe the steps involved in solving a problem. � Writing one helps understand the logic of a problem.

o Definition of required data structures � Along with algorithms, programmers must also determine the most appropriate data structures for

solving a problem. � A data dictionary may be used to determine all the information that is to be stored and determine

a suitable data type.. o Use of data structures, including

� multi-dimensional arrays, • Useful for storing values which are logically stored in a grid or table.

� arrays of records, • Useful for storing a variety of different data types for a number of items.

� files (sequential and relative/random) • A collection of data stored in a logical manner, usually on secondary storage devices. • Sequential files must be read or written to from start to finish in a linear fashion.

o eg. data tape • Relative/random files allow access of different parts of the file in a non-sequential

manner. o eg. hard drive

o Use of random numbers � Often used to allow access to unpredictable data. � Usually generated as rational numbers between 0 and 1.

o Thorough testing � Testing must be completed at each stage of the development cycle. � If a mistake is carried through the software development cycle, it becomes increasingly

expensive to fix.

Standard Modules (Library Routines) Used In Software Solutions • Requirements for generating of subsequent use include:

o Identification of appropriate modules � Best to only use modules or libraries that are necessary to perform the required task. � Using unnecessary/redundant libraries is a waste of resources.

o Consideration of local and global variables � Local variables can only be used within their own module/subprogram. � Global variables can be accessed throughout the whole program.

Page 14: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 14 of 26

o Appropriate use of parameters (arguments) � Parameters are data items which can be passed to and from subprograms.

o Appropriate testing using drivers � Drivers are a temporary sections of code created to test an individual process. � Useful if you need to test a subprogram which will not function individually.

o Thorough documentation � Modules must be well documented so programmers using the code will know how to correctly

pass parameters, etc.

Customisation of Existing Software Solutions • Identification of relevant products

o Many programming languages come with a range of sample programs which can sometimes be used for customisation.

• Customisation o Determining the portions of the program relevant to the solution and modifying them to suit your own

needs. • Cost effectiveness

o Customising existing solutions often results in faster development time leading to a lower development cost.

Documentation of the Overall Software Solution • Tools for representing a complex software solution include:

o Algorithm descriptions � Provide a detailed description of the logic carried out in a program. � Do not indicate data manipulation.

o System flowcharts � Graphical means of representing the logic of a computer system. � Also demonstrate the source and destination of data which is used by the system.

o Structure diagrams � Method of representing the elements of a system in a hierarchical form. � Modules represented by boxes with data and controls past between modules.

o Data flow diagrams � Useful for tracking the movement of data through a system. � Graphically show the processing which occurs in a system and indicate where data is stored.

o Data dictionary � Helps the programmer understand the data that will be used in a particular program. � Includes the names, data types and descriptions of the data items used.

Page 15: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 15 of 26

9.2.3 – Implementation of Software Solution

Interface Design in Software Solutions • The design of individual screens, including:

o Identification of data required � Individual screens must display data. � Good design will enhance the ability of the user to view or enter data. � Such screen layout techniques include:

• Appropriate use of graphics • Positioning of text on the screen • Alignment and justification • Appropriate use of upper and lower case • Colour of text and background

o Current popular approaches � Early computer programs relied heavily on command line interfaces. � Graphic User Interfaces (GUIs) that use the following elements are now usually used:

• Menus • Windows • Icons • Scroll bars • Radio Buttons • Dialogue boxes

o Design of help screens � Help screens should be simple, non-threatening and guide the user in a positive manner. � Context sensitive, procedural and conceptual help as well as tours and tutorials can be used.

o Audience identification � Language should be clear and unambiguous. � The program must use language appropriate for its target group.

o Consistency in approach � It is important to keep fonts, colours and placement consistent throughout the program so that it

is easier to use to for the user.

Language Syntax Required for Software Solutions � Use of BNF, EBNF and railroad diagrams to describe the syntax of new statements in the

chosen language o Clear and unambiguous description of the syntax of a programming language. o Examples:

� BNF • word ::=<letter><word>|<letter> • letter ::= a | b | c | d | ... | y | z

� EBNF • word = <letter> {<letter>} • letter = a | b | c | d | ... | y | z

� Railroad Diagram

• • Commands of incorporating the definition and use of:

o Multi-dimensional arrays � Visual Basic EBNF

• MultiDimensionalArray = [DIM|PUBLIC|PRIVATE|STATIC] <identifier> “(“<number>[TO <number>](,<number> [TO <number>]){,<number> [TO <n umber>]} “)” AS <type identifier>[*<type length>]

o Arrays of records � Visual Basic EBNF

• ArrayOfRecords = [PRIVATE|PUBLIC] TYPE <varname> <e lementname> [“(“[<number> TO] <number>{,[<number> TO] <number>}”)”] AS <type iden tifier>{<elementname> [“(“[<number> TO] <number>{,[<number> TO] <number>} ”)”] AS <type identifier>} END TYPE

Page 16: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 16 of 26

o Files (sequential and relative/random) � Visual Basic EBNF (Sequential)

• OpenFile = OPEN <pathname> FOR <mode> AS #<filenumb er> [LEN=<reclength>] WriteToFile = WRITE|APPEND #<filenumber>, <varname> <dataitem> {, <varname><dataitem>}

� Visual Basic EBNF (Random Access) • OpenFile = OPEN <pathname> FOR <mode> AS #<filenumb er> [LEN=<reclength>]

WriteToFile = PUT #<filenumber>,[<recnumber>],<varn ame> o Random number generators

� Visual Basic EBNF • RandomNumber = RND[“(“<number>”)”]

The Role of the CPU in the Operation of Software • Machine code and CPU operation

o Instruction format � Before a computer can use a program, it must be converted into binary digits. � The instruction is the binary command given to the CPU by a computer program.

o Use of registers and accumulators � Registers are temporary storage locations that can hold one instruction. � The accumulator is one of these registers.

o Use of program counter and fetch-execute cycle � The program counter is a register that stores the address of the next executable instruction. It is

automatically incremented when an instruction is executed. � The fetch-execute cycle involves the following steps:

• The processor reads an instruction from memory (fetch). • The control unit decodes the instruction to determine the action to be taken. The

operation code is also decoded according to the instruction set in the computer's ROM. (decode)

• The action is then carried out by the ALU (execute). • The results of the action are stored in memory. (store)

o Addresses of called routines � Commands to be executed are stored with the operation code in the computer's RAM. � Each memory address is accessed sequentially unless the instruction is to jump to another part of

the program. o Linking, including the use of DLL’s

� Linking allows a machine code program to combine with other machine code programs. � Dynamic link libraries (DLLs) are collections of programs in machine code which can be

accessed by other programs to perform specific tasks.

Translation Methods in Software Solutions • Different methods include:

o Compilation � Taking the source code and converting it into executable code that can be executed independently

and without the need for a translator. o Incremental Compilation

� Compiling fragments of source code at a time. Only the code that has changed since the last compile needs re-compilation.

o Interpretation � Each line of the source code is translated into machine code and executed immediately. An

interpreter (translator) must be present on the computer the code is to be executed on. • The translation process

o Source code is translated into machine executable code. o High level languages cannot be directly understood by computers so they must be converted into a form

that can be understood by the processor.

Page 17: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 17 of 26

• Advantages and disadvantages of each method o Compilation

� Advantages: • Original source code is not available to the users so it is kept protected. • Source code can be executed faster. • An interpreter does not have to be installed on the machine for the code to be executed.

� Disadvantages: • Every time a change is made in the source code the whole program has to be recompiled.

o Incremental Compilation: � Advantages:

• Original source code is not available to the users so it is kept protected. • Source code can be executed faster. • An interpreter does not have to be installed on the machine for the code to be executed. • Recompilation is not necessary every time a fragment of code is changed.

� Disadvantages: • It is difficult to keep track which modules have been modified/precompiled.

o Interpretation: � Advantages:

• Faster to develop because you can test each line of code as you go. � Disadvantages

• Interpreter must be installed on the user’s machine. • Slower to execute the code.

Program Development Techniques in Software Solutions • Structured approach to complex solution, including:

o One logical task per subroutine � Coding a subroutine that performs only one task, but performs it efficiently. � Allows it to be low maintenance and reusable.

o Stubs � Dummy procedures/modules that supply either/both:

• Some data to allow the calling module to continue working. • An output statement indicating the stub modules has been called correctly.

o Flags � Boolean variable that indicates that an event has occurred.

o Isolation of errors � Errors can often be located by:

• Using debugging output statements. • Commenting out sections of code to determine which part is causing the error. • Setting break points to exit the program if a certain event occurs.

o Debugging output statements � Debugging output statements, such as variable traces, are used to print the value of a variable at a

certain point of the code to test if the algorithm is operating correctly. o Elegance of solution

� Being able to solve a problem with the minimum amount of code. It often requires lateral thinking so that unnecessary steps can be skipped.

o Writing for subsequent maintenance � Taking the source code and converting it into executable code that can be executed independently

and without the need for a translator. • The process of detecting and correcting errors, including:

o Syntax errors � Easily corrected errors in the coding of the solution. � Occur when you do not follow the syntax rules of a language correctly.

o Logic errors � When a program performs an incorrect action or gives out the wrong output due to flawed logic. � Must be corrected by testing and debugging through use of good test data.

o Peer checking � When programmers not involved with the original design are asked to check the logic of an

algorithm or program.

Page 18: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 18 of 26

o Desk checking � Stepping through the code of a program on paper with pre-determined test data to ensure that the

desirable output is achieved. o Use of expected output

� Inputting the expected variable value manually to test whether the program manipulates that data correctly.

o Runtime errors, including: � Occur as the object code is being executed. Usually due to an error in the program's logic. � Arithmetic overflow

• Occurs when a result cannot be stored in the nominated memory location due to incorrect use of data types and structures.

� Division by zero • Occurs when an undefined arithmetic operation is carried out – usually when the

program attempts to divide a number by zero. � Accessing inappropriate memory locations

• Occurs if inappropriate memory locations are accessed. • Use of software debugging tools including:

o Use of breakpoints � Stopping the execution of code at certain points so that the value of variables at that point can be

observed. o Resetting variable contents

� The values of a variable can be changed as the program is executed to determine if the processes being carried out are accurate.

o Program traces � As the program is run, the actual line of code being executed is displayed on screen. Variable

values can also be viewed. o Single line stepping

� Stepping through the code one line at a time to see how the program operates and manipulates variables.

Documentation of a Software Solution • Forms of documentation, including:

o Process diary � Design or specification documentation used to describe the development process. � Includes:

• Screen layout designs • Data and processing specifications • Descriptions of input and output • Also known as a logbook.

o User documentation � Documentation that helps people work/use the products. � Often include screenshots, step-by-step instructions, contents, index, etc. � Examples of user documentation include:

• User manual • Installation guide • Tutorials • Online help

o Self-documentation of the code � Commenting of the code makes it easier to understand the processes involved for both the

original developer and any other developers who wish to maintain the code in the future. o Technical documentation, including:

� Needed by programmers and developers to allow the program to be modified. � Source code

• The actual programming code that makes up a program. • Should be well commented to explain any obscure areas of the code. • Code should be indented to make it easier to read. • Meaningful variable names should be used.

Page 19: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 19 of 26

� Algorithms • Used to provide a clear description of the steps carried out to solve a problem. • Simplifies any program code so it can be understood. • Common methods of algorithm description include:

o Pseudocode o Flowcharts

� Data dictionary • Used to describe the nature and form of any input data.

� Systems documentation • Provides a description of the operating system, including the use of subprograms and any

special features of the code. o Documentation for subsequent maintenance of the source

� Technical documentation should assist programmers in modifying the code in the future. � Changes made during maintenance should be documented for future reference.

• Use of application software to assist in the documentation process o Use of CASE tools

� CASE tools that help generate user and technical documentation exist to make the job of the programmer easier.

Hardware Environment to Enable Implementation of the S oftware Solutions • Hardware requirements

o Minimum configuration � Commercial software often specifies the minimum hardware configuration needed to run. � Includes aspects such as:

• CPU type/speed • Amount of hard drive storage • Amount of RAM • Operating system version

o Possible additional hardware � If a program is too complex for a system, additional hardware may need to be purchased or

current hardware upgraded. o Appropriate drivers or extensions

� Drivers provide a means of accessing input or output hardware devices. � Extensions enable a program to interact with other programs.

Emerging Technologies • Hardware

o Quantum Computers – Will vastly increase the speed at which computers can operate. o Nanotechnology – Will allow for the sizes of computers to decrease so they can be embedded in more

places. o Holographic Storage – Expand storage devices to a three dimensional level to increase the amount of

data that can be stored greatly. • Software

o Java – Allows for the development of cross-platform applications. Becoming increasingly popular as a programming language.

o Dylan – A programming language which extends upon other object oriented languages by introducing new data structures such as dynamic inheritance and parametric polymorphism.

• Their effect on: o Human environment

� As new technologies emerge, may people strive to incorporate them into their lives. � Most technological items are designed to assist humans in particular tasks. � There can be both positive and negative effects due to technological advance, these should be

determined before a technology is accepted by society. o Development process

� Software is becoming increasingly cross-platform as the line between PCs, PDAs, mobile phones, etc. becomes blurred.

� CASE tools as well as Visual IDEs are assisting programmers to develop applications more quickly and more easily.

Page 20: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 20 of 26

9.2.4 – Testing and Evaluation of Software Solutions

Testing the Software Solution • Comparison of the solution with the original design specification

o The solution must meet the original objectives. o Developers must constantly check that the original specifications are being met.

• Generating relevant test data for complex solutions o Test data that will ensure the correct functioning of the algorithm must be generated. o This often involves data which tests boundary conditions for various methods. o Sometimes not all procedures can be tested, but developers should strive for as much testing as possible.

• Levels of testing o Unit or module

� It is often possible to test a small section of the program by entering inputs and observing outputs for that module.

� If the workings of the module is known it is called white box testing, but if it is unknown it is called black box testing.

o Program � When a program is tested in its entirety, usually by the developers. This is known as alpha

testing. � Often focuses on testing user interfaces and the interaction of separate modules.

o System � Testing the software in a variety of hardware/operating system environments. � Usually testing is performed by users, this is known as beta testing.

• The use of live test data to test the complete solution: o Larger file sizes

� Larger file sizes for data structures allows the program to be tested under heavier, real-world loads.

o Mix of transaction types � Different transaction types are used in order to test a range of modules.

o Response times � Response times should be kept to a minimum. � Any response times greater than 1 second should have onscreen feedback for the user.

o Volume data � Large amounts of data should be used. � Large volumes of transactions should be tested.

o Interfaces between modules � Every interface that links between modules must be tested. � This includes screens that interface between other applications and hardware.

o Comparison with program test data � The program should be compared with generated expected output to ensure that the correct

outputs are being obtained. • Benchmarking

o Comparing the performance of the product with competitor’s products. o Often carried out by specialised, unbiased companies.

• Quality assurance o Checking how well a solution complies to the user’s expectations, includes:

� Correctness � Efficiency � Flexibility � Integrity � Interoperability � Maintainability/ Modifiability � Portability � Reliability � Reusability � Useability � Validity

o Should be considered throughout the software development process.

Page 21: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 21 of 26

Reporting on the Testing Process • Documentation of the test data and the output produced.

o Use of CASE tools � Can be used for:

• Generating test data • Testing user interface designs • Volume testing

• Communication with those for whom the solution has been developed, including: o Test results

� It is important to communicate any test results to developers and customers. o Comparison with the original design specifications

� Test results must be compared to the original design specifications to ensure that the final solution meets the criteria.

Page 22: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 22 of 26

9.2.5 – Maintenance of Software Solutions

Modification of Code to Meet Changed Requirements • Identification of the reasons for change in code, macros

o Bug fixes o New hardware o New software purchases o Suggested improvements

• Location of section to be altered o Models are used to assist finding the section that needs alteration. o A thorough understanding of the original source code is required.

• Determining changes to be made o Once the required module is located, IPO charts and algorithms are used to determine what to modify. o Effect of the changes on other modules must be considered.

• Implementing and testing solution o Once the changes have been determined, they must be made in the source code. o Code must then be recompiled, tested and distributed. o Distribution may be through:

� Direct change on the user’s system � Remote change via telecommunication link � User applied patches

Documentation of Changes • Source code, macro and script documentation

o Includes comments and intrinsic documentation. o Improves the maintainability for future changes.

• Modification of associated hard copy documentation and online help o Hard copy documentation may need to be reproduced or a “release note” may need to be added to outline

any changes. o Online documentation would need to be updated if any of the procedures within the program change.

• Use of CASE tools to monitor changes and versions o Versioning CASE tools such as CVS can monitor changes in source code and maintain a log of changes

so programmers can see how and why programs have been modified.

Page 23: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 23 of 26

9.3 – Developing a Solution Package

Designing and Developing a Software Solution to a Co mplex Problem • Defining the problem and its solution including:

o Defining the problem: � Identification of the problem � Idea generation � Communication with others involved in the proposed system

o Understanding � Interface design � Communication with others involved in the proposed system � Representing the system using diagrams � Selection of appropriate data structures � Applying project management techniques � Consideration of all social and ethical issues

o Planning and designing � Interface design � Selection of software environment � Identification of appropriate hardware � Selection of appropriate data structures � Production of a data dictionary � Definition of required validation processes � Definition of files – record layout and creation � Algorithm design � Inclusion of standard or common routines � Use of software to document design � Identification of appropriate test data � Enabling and incorporating feedback from users at regular intervals � Consideration of all social and ethical issues � Applying project management techniques

Systems Implementation • Implementing the software solution by:

o Implementation � Production and maintenance of data dictionary � Inclusion of standard or common routines � Use of software to document design � Translating the solution into code � Creating online help � Program testing � Reporting on the status of the system at regular intervals � Applying project management techniques � Enabling and incorporating feedback from users at regular intervals � Completing all user documentation for the project � Consideration of all social and ethical issues � Completing full program and systems testing

o Maintenance � Modifying the project to ensure an improved solution

Page 24: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 24 of 26

9.4 – Options

9.4.1 – Option 1: Evolution of Programming Languages

Historical Reasons for the Development of the Differen t Paradigms • A need for greater productivity

o Initially computers were programmed in machine code which was slow and tedious. o Assembly language was developed to somewhat simplify the job of programmers but still required a great

deal of skill and time. o Third generation languages allowed multiple actions to be completed in the same line of code. English-

like commands were developed which not only allowed a wider range of people to learn to program but also increased the speed at which programs could be developed.

o Forth-generation languages do not require the programmer to describe how to solve the problem but rather only to ask what to solve. They commonly used for databases and increase productivity in this field immensely.

• Recognition of repetitive standard programming tasks o Many of the tasks which computer programs require to carry out are basic and repetitive. o Programming languages were developed which could specially solve these specific types of problems.

• A desire to solve different types of problems (eg AI) o Computers were initially designed to solve mathematical problems. o Since then their uses have increased and they are used to solve a wide range of problems, but these have

mostly been solved logically and sequentially. o Non-procedural languages are being developed to solve new types of problems, often ones where the

input and output data are not as clear cut as is currently the case when using computers. • The recognition of a range of different basic building blocks

o Four main categories of paradigms have emerged, imperative, functional, logic and object-oriented. o Each paradigm uses a different range of building blocks to solve problems.

• Emerging technologies o While different paradigms for programming exist, all modern processors still process data sequentially. o Emerging technologies that will assist in the development of different programming paradigms include:

� Quantum Computing – Uses atomic particles to that can exist at a range of different energy levels to express data rather than bits, which can only exist in two states.

� Neural Networks – Involve a large number of processors, each connected to its own local memory to simulate the way in which the human brain operates.

� Visual Programming Languages – Enhanced object oriented languages that allow programs to be created simply by dragging and dropping elements to create objects.

Basic Building Blocks • Variables and control structures (imperative)

o Variables (data structures) assign identifying names to memory locations. o Control structures provide ways of manipulating the data – they include:

� Sequence (progressing in order) � Selection (choosing to do something based on conditions) � Repetition (looping through a task a number of times)

• Functions (functional) o Functions are programmed to solve problems mathematically.

• Facts and rules (logic) o Facts tell you things about the problem you are trying to solve. o Rules specify the way in which the problem must be solved.

• Objects, with data and methods or operations (object oriented) o Objects (also called classes) are self contained modules that contain data, methods and operations. o Data is stored as variables within its own object. o Methods are sections of code which carry out instructions when the object is sent a message. o Operations are single processes applied to data elements.

Page 25: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 25 of 26

Effect on Programmers’ Productivity • Speed of code generation

o As languages get more advanced, the amount of tasks you must complete to solve any particular problem generally decreases.

o Initially coding in machine code took an extremely long time, but with high level languages the use of data and control structures and equivalents has increased the speed of code generation.

• Approach to testing o Imperative Languages

� Logical structuring makes the location of errors in the code easier. o Functional Languages

� Employ simple syntax which reduces the likelihood of syntax errors. o Logic Languages

� Because they don't need complicated control structures, contain less code to test. o Object Oriented Languages

� Paradigm encloses different functions in modules which can be tested separately. • Effect on maintenance

o Object Oriented Languages � Because they are modular in nature, this means that they are much easier to maintain. � If increased functionality is required or errors are detected, only the affected module needs to be

modified. • Efficiency of solution once coded

o Imperative Languages � Run more efficiently because they are based on the same architecture as the CPU they run on. � Take longer to develop programs in.

o Functional Languages � Can be split into different parts to utilise multi-threading. � Logic Languages

• Run quite inefficiently on modern processors because they are non sequential. • Object Oriented Languages

o Efficient to code due to the existence of different modules for different tasks. o Less efficiently executed than imperative languages.

• Learning curve (training required) o Imperative Languages

� Relatively low learning curve due to logical sequential manner. � Logic Languages

• Uses logical reasoning based on mathematical principles. • Easier to teach to someone new at programming that someone who has already worked

with another paradigm. • Object Oriented Languages

o Try to mimic the way we think and operate by using objects that know and can do things.

o Relatively low learning curve.

Paradigm Specific Concepts • Logic paradigm • Prolog, expert shells

o Heuristics � Also called rules of thumb. � The criteria for deciding which alternative course of action would be most effective to achieve a

goal. o Goal

� The statement which the program is trying to determine. The desired output of the program. o Inference engine

� The section of an expert system that contains logic functions. � Used to apply the knowledge of the system to resolve goals.

Page 26: HSC Course NotesHSC Software Design & Development Course Notes Adam Stiskala Page 5 of 26 • The effect on the marketplace o A product’s effect on the marketplace is determined

HSC Software Design & Development Course Notes Adam Stiskala

Page 26 of 26

o Backward / forward chaining � Methods of resolving a goal based on the facts and rules supplied. � Forward chaining starts with the facts and rules and tries to establish matches.

• SDD is in the HSC Adam is doing SDD Therefore, Adam is doing the HSC

� Backward chaining starts with the goal and then works backwards to try and prove the validity of each statement.

• Adam is doing the HSC Database is searched for facts about Adam Adam is doing SDD Database is searched for facts about SDD SDD is in the HSC

• Object oriented (OOP) o Methods

� Methods are housed within classes. � They are the executable part of a class.

o Classes � A class is a group of objects sharing some common characteristics and performing similar

operations. The class defines all the common attributes and methods of the different objects that belong to it.

• class SDDIsFun { int test; // } int test2; // } char test3; // Common attributes string test4; // } double test 5; // } public static void main(){ // common method } }

o Inheritance � When objects (descendent) inherit all data items and methods from the class it has been created

from (ancestor). • KeyboardReader in = new KeyboardReader();

KeyboardReader in2 = new KeyboardReader(); // 2 decedents created from the same ancestor

o Polymorphism � The ability to appear in many forms depending on the data type of the parameter parsed. Allows

many different objects to use a particular behaviour or method. The particular example below is a technique called “method overloading”.

• class polymorphism { public static void wang(int a) { // Do something for int } public static void wang(char a) { // Do something else for char } }

o Encapsulation � Placing/defining all data elements and methods within their own class.

• class encapsulation { int number = 0; string word = “wang”; // These data items are encapsulated within the // “encapsulation” class. }

o Abstraction � A way of simplifying or representing the problem. A way of talking about the problem and its

solution without worrying about the underlying detail. Representing a complex task in a simple or symbolic way.

o Functional � LISP, APL � Functions

• Evolved from the mathematical function theory. • A relationship between two sets of elements.