BENG406 

Module Name Engineering Programming 
Module Code BENG406 
Level Four 
Credits 15  

  

  

Module Description and General Aims 

The objective in presenting this module is to provide students with basic engineering programming concepts, algorithms, and programming techniques necessary to support subsequent studies in engineering. This module enables the student to acquire the software literacy essential to working creatively in an engineering environment. On completion of the module, the student would have learned how to utilise structured programming to translate and implement problems in C programming language and use computer programming to solve problems in engineering contexts. 

The primary topics in this course include but are not limited to: computer representation of various data types; the computer instruction set; basic C syntax; logic operators; flow control; functions; arrays; pointers; simple I/O; basic microprocessor instructions; relationships between assembly language and C; compilation; linkage; and loading of programs. The module also equips the student with the necessary skills to formulate solutions to common engineering problems using MATLAB, Excel and Python programming. 

  

Learning Outcomes 

On successful completion of this Module, students are expected to be able to: 

  1. Write and interpret moderately complex C programs 
    Bloom’s Level 6 
  1. Structure programs 
    Bloom’s Level 6 
  1. Incorporate basic file processing techniques into programs 
    Bloom’s Level 3 
  1. Conceptualize engineering problems to computational problems 
    Bloom’s Level 4 
  1. Solve real-world problems by formulating solutions, and developing and troubleshooting C programs to implement solutions 
    Bloom’s Level 6 
  1. Demonstrate proficiency in MATLAB, Excel and Python programming 
    Bloom’s Level 3 

  

Student Assessment 

Assessment Type When assessed Weighting (% of total module marks) Learning Outcomes Assessed 
Assessment 1 Type: Multi-choice test / Group work / Short answer questions / Practical 
Example Topic: Data types, operators, functions, relational and logic operators. 
Students may provide solutions to simple problems on various topics 
After Topic 4 20% 1, 2, 3, 4 
Assessment 2 Type: Multi-choice test / Group work / Short answer questions / Practical 
Example Topic: Software solutions using C programming 
Students may complete a quiz with MCQ type answers or solve some simple problems or use software to complete a practical. 
After Topic 7 20% 1, 2, 3, 4 
Assessment 3 Type: Project 
Example Topic: C programming 
Comprehensive programming task using C programming to create functional software. 
After Topic 9 30% 1, 2, 3, 4,5 
Assessment 4 Type: Multi-choice test / Group work / Short answer questions / Practical 
Example Topic: MATLAB, Excel and Python 
Students may complete a quiz with MCQ type answers and solve some simple equations to demonstrate a good understanding of the fundamental concepts. 
Final Week 25% 
Attendance / Tutorial Participation Example: Presentation, discussion, group work, exercises, self-assessment/reflection, case study analysis, application. Continuous 5% – 

  

Overall Requirement: An overall final module score of 50% or above must be achieved to pass the module once all assessment, including the exam, has been completed. 

Prescribed Readings 

Suggested Textbook 

J. R. Hanly, E. B. Koffman, Problem Solving and Program Design in C, 8th Edition, 2015. ISBN: 978-1292098821. 

J. Whitington, Python from the Very Beginning, 2020. ISBN: 9780957671157 (Free HTML version available at: https://coherentpdf.com/python/index.html) 

Reference Materials 

The Python Tutorial, https://docs.python.org/3/tutorial/ 

• S. T. Karris, Numerical Analysis using MATLAB and Excel. Orchard Publications, I2007. SBN-13: 978-1934404041 

• Deitel, H, Deitel, P 2012: C: How to Program, 7th edn, Pearson Education, ISBN-13: 978-0132990448 
• Chapman, SJ 2008, MATLAB Programming for Engineers, 4th edn, Thomson, ISBN-13: 978-0-495-24449-3. 
• Downey, A 2009, Physical Modeling in MATLAB, Open Textbook Library 
• Peer-reviewed journals 
• Knovel library: http://app.knovel.com 
• IDC Technologies publications 
• Other material and online collections as advised during the lectures 

Journal, website 

Several peer-reviewed journals and websites (advised during lectures) 
Science of Computer Programming 
http://www.journals.elsevier.com/science-of-computer-programming/ 

  

Module Content 

One topic is delivered per contact week. 

  

Topic 1 

Overview of Engineering Programming 

  1. Computers: Hardware and Software 
  1. Computer Organization (CU, ALU, registers, memory and clock/execution) 
  1. Personal, Distributed and Client/Server Computing 
  1. Machine Languages, Assembly Languages and High-Level Languages 
  1. Some common terms and definitions (software as a service, infrastructure as a service, cloud computing, AWS, relational database, data warehouse, machine learning, Internet of Things (IOT), Big data, etc. 
  1. The Software Development Method 
  • Specifying the problem requirements. 
  • Analysing the problem. 
  • Designing the algorithm to solve the problem. 
  • Implementing the algorithm. 
  • Testing and verifying the completed program. 
  • Maintaining and updating the program. 
  1. Professional Ethics for Computer Programmers 

Topic 2 

Overview of C Language 

  1. C Language Elements 
  1. Variable Declarations and Data Types 
  1. Executable Statements 
  1. General Form of a C Program 
  1. Arithmetic Expressions 
  1. Formatting Numbers in Program Output 
  1. Interactive Mode, Batch Mode, and Data Files 

Topic 3 

Top-Down Design with Functions 

  1. Building Programs from Existing Information 
  1. Library Functions 
  • Math Library Functions 
  • Function Definitions 
  • Function prototypes 
  • Function call stack and activation records 
  • Headers 
  • Random number generation 
  1. Top-Down Design and Structure Charts 
  1. Functions without Arguments 
  1. Functions with Input Arguments 

Topic 4 

Selection Structures: if and switch Statements 

  1. Control structures: sequence, selection, and repetition 
  1. Conditions 
  1. Relational and Equality Operators 
  1. Logical Operators 
  1. Operator Precedence 
  1. Writing Conditions in C 
  1. Comparing Characters 
  1. Logical Assignment 
  1. Complementing a Condition 
  1. The if Statement 
  1. If Statements with Compound Statements 
  1. Decision Steps in Algorithms 
  1. Nested if Statements and Multiple-Alternative Decisions 
  1. The switch Statement 

Topic 5 

Repetition, Loop Statements and Recursion 

  1. Repetition in Programs 
  1. Counting Loops and the while Statement 
  1. Computing a Sum or a Product in a Loop 
  1. Conditional Loops 
  1. Loop Design 
  1. Nested Loops 
  1. The do-while Statement and Flag-Controlled Loops 
  1. Iterative Approximations 
  1. Recursion 
  1. The Nature of Recursion 
  1. Tracing a Recursive Function 
  1. Recursive Mathematical Functions 
  1. Example Using Recursion: Fibonacci Series 

Topic 6 

Arrays 

  1. Declaring and Referencing Arrays 
  1. Array Subscripts 
  1. Using for Loops for Sequential Access 
  1. Using Array Elements as Function Arguments 
  1. Array Arguments 
  1. Searching and Sorting an Array 
  1. Parallel Arrays and Enumerated Types 
  1. Multidimensional Arrays 
  1. Graphics Programs with Arrays 

Topic 7 

Pointer, Modular Programming, Debugging and Testing, Dynamic Data Structures 

  1. Pointers and the Indirection Operator 
  1. Functions with Output Parameters 
  1. Multiple Calls to a Function with Input/Output Parameters 
  1. Scope of Names 
  1. Formal Output Parameters as Actual Arguments 
  1. Debugging and Testing a Program System 
  1. Dynamic Data Structures 
  1. Pointers to structures 
  1. Dynamic Memory Allocation 

Topic 8 

Strings 

  1. String Basics 
  1. String Library Functions: Assignment and Substrings 
  1. Longer Strings: Concatenation and Whole-Line Input 
  1. String Comparison 
  1. Arrays of Pointers 
  1. Character Operations 
  1. String-to-Number and Number-to-String Conversions 

Topic 9 

User defined Structures, Files and Libraries, storage classes and compilation 

  1. User-Defined Structure Types 
  1. Structure Type Data as Input and Output Parameters 
  1. Functions Whose Result Values Are Structured 
  1. Input/Output Files 
  1. Binary Files 
  1. Procedural Abstraction 
  1. Data Abstraction 
  1. Personal Libraries: header files, implementation files 
  1. Storage classes 
  1. Conditional compilation 
  1. Arguments to Function main 

  

Topic 10 

Introduction to MATLAB 

  1. The MATLAB Environment 
  1. The MATLAB Desktop 
  1. The Edit/Debug Window 
  1. Docking and Undocking Window 
  1. The MATLAB Workspace 
  1. The Workspace Browser 
  1. Variables and Arrays 
  1. Initializing Variables in MATLAB 
  1. Vectors, Matrices and Arrays 
  1. Multidimensional Arrays 
  1. Subarrays 
  1. Displaying Output Data 
  1. Data Files 
  1. Hierarchy of Operations 
  1. Built-in MATLAB Functions 
  1. Common MATLAB Functions 
  1. Introduction to Plotting 

Topic 11 

Numerical Analysis using MATLAB and Excel 

  1. Roots of Polynomials 
  1. Polynomial Construction from Known Roots 
  1. Evaluation of a Polynomial at Specified Values 
  1. Rational Polynomials 
  1. Root Approximation 
  1. Matrices and Determinants 
  1. Functions and cell operations in Excel 
  1. Mathematical problem solving and plotting using Excel 
  1. Numerical integration and differentiation using excel 
  1. Macros 

Topic 12 

Introduction to Python 

  1.  Introduction to Python 
  1. Using the Python Interpreter 
  1. Control Flow Tools in Python 
  1. Data Structures 
  1. Modules 
  1. Input and Output 
  1. Classes 
  1. Using Python Standard Library 
  1. Module Review 

  

Software/Hardware Used 

Software 

  • Software: MATLAB 
  • Version: 2018a+ 
  • Instructions:  Y:\Data – ALL.E-Learning\Software\Remote Labs\Instructions for Specific Labs\MATLAB 
  • Additional resources or files: N/A 

  

  • Software: MS Excel 
  • Version: 2010+ 

  

  • Software: Python 3.10 
  • Software: CodeBlocks C/C++ IDE 
  • Additional resources or files: N/A 

  

  • Software: Repl.it (Cloud IDE) 
  • Additional resources or files: N/A 

Hardware 

  • N/A