Programming and Design Principles

Introduction 

IT Rule & Regulations

File Management

  • Create a folder for each component (files and folders)
  • Backup o Google Drive, iCloud, Dropbox, etc

Assessment

Network Logon accounts

  • Available from Course Director (UN: student, PW: letmein)

Component Descriptor NEW UPDATED component to be uploaded

Resources

Learning Outcomes

  1. Demonstrate an understanding of the historical development of computer programming.
  2. Demonstrate an understanding of algorithms and their applications in solving real-world problems.
  3. Differentiate between programming languages by identifying their distinguishing characteristics.
  4. Develop an understanding of the procedural syntax of a modern programming language to include storage (variables and data types), expressions, statements, input/output, reserved keywords and operators.
  5. Explain the sequential nature of problem solving and how it relates to the science of computer programming.
  6. Summarise a broad range of structured programming and design concepts to include pseudo-code, storage and control structures (selection and iteration).
  7. Develop a range of documented computer programs to solve a variety of familiar and unfamiliar specified problems.
  8. Utilise a selection of modularisation concepts such as functions, procedures, variable scope and parameter passing.
  9. Interpret compiler and linker messages to the extent that an appropriate course of action can be taken to remedy any reported errors.
  10. Devise a testing process using structured walk-throughs and debugging tools.
  11. Comply with an accepted set of coding standards in their use of comments, indentation and variable naming.
  12. Work as part of a team to design, develop, release and review multiple versions of a multi modular program over an extended period of time

Java

  • Installation of JDK (Java Development Kit) from Oracle website and Installation of Java runtime environment (IntelliJ IDEA, Eclipse or NetBeans);
  • Installing Java JDK on Window 10 machine – Video
  • Java Syntax – https://en.wikipedia.org/wiki/Java_syntax
  • Java Core – Core Java refers to a collection of libraries rather than just the programming language. It’s the purest form of Java primarily used for development of general desktop applications. Simply speaking, it refers to the subset of Java SE technologies which consists of both general purpose API’s and special purpose API’s.
  • Java Collections – The Java collections framework is a set of classes and interfaces that implement commonly reusable collection data structures. Although referred to as a framework, it works in a manner of a library. The collections framework provides both interfaces that define various collections and classes that implement them.
  • Java Frameworks and LibrariesFrameworks and libraries are both code written by someone else that helps you perform some common tasks in a less verbose way. A framework inverts the control of the program. It tells the developer what they need. A library doesn’t. The programmer calls the library where and when they need it. Read more
  • APIs – The full form of API is Application Programming Interface. It is a document which gives you the list of all the packages, classes, and interfaces, along with their fields and methods. Using these API’s, the programmer can know how to use the methods, fields, classes, interfaces provided by Java libraries. API examples – Google Maps API: Google Maps APIs lets developers embed Google Maps on webpages using a JavaScript or Flash interface. YouTube APIs: YouTube API: Google’s APIs lets developers integrate YouTube videos and functionality into websites or applications. See www.rapidapi.com

Class notes – Java(identifiers/variables/operates/conditions/etc – Java – Book of notes

Section 1: History of programming – Learning outcomes 1 and 3
Explain the historical development of computer programming languages and discuss the need for
different languages and their distinguishing features.
• Define a programming language. 0 Definition of a computer programming language
• Explain the historical development and evolution of programming languages. 1 History of programming languages
• Explain how programming languages differ from one another and the reasons for different programming languages. 2 Differences between programming languages
• Explain different programming paradigms, for example, procedural, functional, object oriented, scripting and logic. 3 Programming Paradigms
• Explain syntax and the need to adhere to the syntax of a programming language. 4 Syntax
• Outline the distinguishing characteristics of languages. – http://dafoster.net/articles/2013/01/29/unique-features-of-various-programming-languages/
o Outline what they have in common e.g. strict syntax rules, data storage, input statements, output statements, branching, looping.
o Outline their differences e.g. different syntax, different structures, different focus. – 10-Class-Notes
• Explain the different generations of programming languages.
• Explain machine code. – Machine Code
• Explain low level programming, assembly language and an assembler. – Low Level Programming
• Explain high level languages, compilers, interpreters and translators. – High Level Languages – Compilers – Interpreters – Translators

Class Exercises – Write Java code

Section 2: Algorithms and pseudocode – Learning outcomes 2, 5 and 6 20-Class-Notes – Limit_Summing_Series_Prog
Enable the user to develop an algorithm and to use pseudcode to design a solution to a problem.
• Explain the sequential nature of problem solving.
• Outline the steps that should be followed when writing a program i.e. design, code and testing.
• Explain how to construct an algorithm. – 21-Program_Algorithms
o Explain different types of data storage and the range of data that can be stored for each data type.
o Explain the importance of using pseudocode.
o Demonstrate pseudocode examples for basic programming problems.
o Assist the learner in developing good and consistent pseudocode style.
• Explain the importance of developing a comprehensive set of test data to test a program.

Section 3: Basic programming concepts
Learning outcomes 4, 6, 7 and 9
Understand the core principles involved in designing a program. Introduce the learner to the basic concepts involved in programming, including storage, input, output, reserved keywords and mathematical operators. Facilitate the user in creating and debugging programs that use these concepts. Java Operators 1

Java IO (input/output) http://tutorials.jenkov.com/java-io/index.html

• Familiarise the learner with the structure and basic syntax of a program.
• Explain the sequential nature of program execution.
• Explain reserved keywords to the learner.
• Explain the syntax to output text in a program.
• Create a program that produces simple output e.g. “Hello World”.
• Examine the numeric, character and string data types available in a chosen programming language. For each data type, identify the range of data that it can store and the amount of RAM that it requires.
• Explain the syntax of variable declaration.
• Explain syntax
• Explain the different types of loops available in the chosen programming language and present the syntax of each type of iterative loop.
• Develop programs that demonstrate each type of iterative loop.

Notes

Section 4: Branching and iteration – Learning Outcomes 6 and 7
Using a chosen programming language, introduce the learner to branching and iteration by creating and debugging programs to include the following:

• List and explain the relational operators available in the chosen programming language and their precedence. – Relational Operators
• List and explain Boolean operators. – Boolean Operators
• Equip the user with the precedence of all operators. – Operator Precedence in Java
• Explain the syntax of constructing a condition and examine how that condition is evaluated.
• Explain branching/selection (including multi-conditional branching).
• Develop programs that use branching/selection, including multi-conditional branching. If Condition – Exercise
• Explain iteration and list examples where iteration is necessary to solve a given problem.
• Explain the use of post-test, pre-test and counting loops. Identify problems where loops are necessary and discuss the most suitable loop to use.
• Explain the different types of loops available in the chosen programming language and present the syntax of each type of iterative loop.
• Develop programs that demonstrate each type of iterative loop.

Notes

Section 5: Modularisation Learning Outcome 8 – Sample Code Functions_Modular_Programming Modules explainedvideo
Identify the need for modularisation, parameter passing and reusability. Create programs that use functions that can be reused. Examine the scope of variables and determine the most appropriate location for declaration.
• Identify the advantages of modularisation within a program.
• Differentiate between local and global variables and explain variable scope. – Local_Static_Instance_TypesOfVariables
• Explain the syntax of a simple module i.e. a module with no parameters and no returned value.
• Develop programs that use modules and use local and global variables according to best practice.
• Explain the advantages/reasons for passing parameters to a module within a program.
• Explain the syntax of a module that accepts parameters.
• Develop modular programs that pass one or more arguments to one or more modules within a program.  – Java Functions and Creating Modular Code https://www.youtube.com/watch?v=EuX-X5hTjLw – Functions_Modular_Programming
• Explain the advantages/reasons for returning a value from a module within a program.
• Explain the syntax of a module that returns a value.
• Develop programs that contain modules that return a value.
• Explain system defined functions.
• Explain how a programmer can access system defined functions.
• Develop programs that use system defined functions.

Class Exercises

Checking Strings for permitted characters/digits – Pattern Matching

Section 6: Testing a program – Learning Outcome 10
Facilitate the user to devise suitable test data for each program that they code, to apply this test data to their code and to revise their code until it is accurate and reliable.
• Identify critical test data for each program. Ensure that the test data contains a good mix of values and that incorrect user input is tested and dealt with effectively.
• Develop test results for each item of test data including the output that should result from incorrect/invalid user entry.
• Match test results to actual results.
• Facilitate the user in identifying and correcting any syntax, logical and runtime errors in their code by using structured walk-throughs and debugging tools to locate and correct errors.

Section 7: Best practice Learning Outcome 11
Provide an awareness of industry standards and best practice in the following areas:
• Coding standards. https://android.jlelse.eu/java-coding-standards-ee1687a82ec2 – Code_Conventions
• Comments standards. – Use // for single line comment. Begin with multiple lines with /* and end  with */ 

• Identifier names standards. – CamelCase/Hungarian Notation – https://www.javatpoint.com/java-naming-conventions
• Indentation standard. – indent to make code easier to read (indent between {} )
• Consistent screen design. – Use \n for new line, \t for tab indent or Formatting output using System.out.printf()
• Ease of use. – Simple efficient code with meaningful user prompts which makes your software easy to use.
• Error trapping and reporting.  –  Using_Try_Catch_to_prevent_crashes

Section 8: Programming as part of a team – Learning Outcome 12

Tools: Github, Asana, Trello, Teamwork

Project Management Software: Microsoft Project, OpenProj, ProjectLibre (free)

Set up teams of between three and five learners to develop one or more programs (defined by the assessor) through all its stages. Facilitate each team in:
• Discussing the problem to be solved.
• Identifying possible solutions to the problem.
• Identifying the best solution to the problem.
• Developing pseudocode for the problem that includes modularisation of the problem. – Functions_Modular_Programming
• Developing test data for the problem.
• Allocating one or more modules to each team member for development with best use of parameters and variable scope.
• Arranging the developed modules into one program.
• Testing the constructed program using the test data developed.
• Revising the developed program until it is reliable, accurate, efficient and adheres to industry standards.
• Releasing the developed program.

Exercises – Class Assessments

Language

GUI (Improving your graphic user interface

  • JavaFX is a software platform for creating and delivering desktop applications, as well as rich Internet applications that can run across a wide variety of devices. JavaFX is intended to replace Swing as the standard GUI library for Java SE, but both will be included for the foreseeable future. – Installing JavaFX

Useful Sites

Webinars

Recommended further study

Screenshots Gallery – Java

Class Notes 

Age_In_Years (incomplete)

0 Sample Java Source Code – Full Program

10 Class Notes

20 Class Notes

21 Program_Algorithms

22 Algorithms

23-Flow-Chart

24 Draw the Flow Chart to calculate the volume of a cone

25 Draw the Flow Chart for Multiplication Tables

30 Visual Basic v Javascript

50 Input_Output_Dialogs_in_Java

Bicycle_Hire_Code_Unfinished

Character Search in a String

Distance between 2 points

Distance between 2 points

Division by Zero – Error-Handling-Exceptions

Division by Zero – Error-Handling-Exceptions

Functions in Java

L02-Algorithms

Letters Input Test

Pre SD2 Exercise

Pre_Test_and_Post_Test_Loops

0 Programming Design Principles – Rays notes

VB Notes and Exercises

Class Exercises

Modularisation