0% found this document useful (0 votes)
78 views

COMPENG2SH4 Course Outline Spring2024

This document provides an outline for the COMPENG 2SH4 Principles of Programming course, including course description, prerequisites, schedule, instructor details, objectives, topics, materials, and an overview of labs and projects. The course covers fundamental programming concepts in C and C++, including data types, control structures, functions, pointers, classes, and memory management.

Uploaded by

Suemayya S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

COMPENG2SH4 Course Outline Spring2024

This document provides an outline for the COMPENG 2SH4 Principles of Programming course, including course description, prerequisites, schedule, instructor details, objectives, topics, materials, and an overview of labs and projects. The course covers fundamental programming concepts in C and C++, including data types, control structures, functions, pointers, classes, and memory management.

Uploaded by

Suemayya S
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

COMPENG 2SH4

Section/s: C01
Academic Year: 2023/24
Term: Spring

COMPENG 2SH4
Principles of Programming

COURSE OUTLINE
Please refer to the course website for updated information.

COURSE DESCRIPTION

Fundamental concepts of programming languages: data types, assignment, control constructs,


basic data structures, iteration, recursion, exceptions; imperative and object-orientated
paradigms; composing and testing small programs.
Per week: Six (hours of) lectures, two (hours of) tutorials, one lab every week; Spring term.

PRE-REQUISITES AND ANTI-REQUISITES

Prerequisite(s): ENGINEER 1D04 or ENGINEER 1P13 and registration in a program in Electrical


and Computer Engineering or Integrated Biomedical Engineering and Health Science (IBEHS)
program.

Antirequisite(s): COMPSCI 1XC3, COMPSCI 2S03, SFWRENG 2S03, and SFWRENG 2XC3

SCHEDULE and MODE OF DELIVERY

The material for this course will be delivered in a semi-flipped classroom arrangement - pre-
lecture online videos, in-person lectures with live coding activities, in-person tutorials with live
coding practice, and asynchronous laboratories and project activities with selected in-person
feature-based demos.
Lecture:
Section C01 – Mondays, Wednesdays and Fridays - 11:30 am to 1:30 pm. In-person, semi-
flipped classroom with live coding activities, not recorded. Location: HH 109

Tutorial:
Section T01 – Wednesdays and Fridays - 2:30 pm to 3:30 pm – In-person with live coding
activities and practice along with lab and project briefings, not recorded. Location: BSB 119

Lab: Lab sessions start on May 6, 2024 (Week 1)


Section L01 – Mondays - 2:30 pm – 5:30 pm every week. Location: BSB 115

Page 1 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

INSTRUCTOR

Dr. Shahrukh Athar


E-mail: athars3@mcmaster.ca
Office: ITB-A317
Phone: 905-525-9140 ext. 26503
Office Hours: see course website for details

TEACHING ASSISTANTS

Names, contact information and office hours are provided on the course website.

COURSE WEBSITE/S

http://avenue.mcmaster.ca

COURSE OBJECTIVES

By the end of this course, students should be able to:


• Recognize and use fundamental program design concepts – procedural programming in
C, and object-oriented programming in C++.
• Master the C syntax, write C programs, and become proficient in using programming
tools such as C functions, arrays, pointers, strings, structures, and dynamic memory
allocation.
• Master the C++ syntax, write C++ programs, and become proficient in using
programming tools such as C++ functions, arrays, classes, and objects.
• Acquire hands-on experience for designing, implementing, and debugging computer
programs in C and C++.
• Recognize the fundamental computer memory structure and acquire basic skills in
memory management strategies using compiled programming language without
automated memory management modules.
• Gain experience in the practical software development lifecycle and sustainable
incremental engineering design process and workflow.
• Gain practical skills to write working programs to solve engineering problems, including
testing, and debugging.

CEAB GRADUATE ATTRIBUTES (GAS)

Note: The CEAB Graduate Attributes (GAs) defined in this section are measured throughout the
course and form part of the Department’s continuous improvement process. They are a key
component of the accreditation process for the program and will not be taken into consideration
in determining a student’s actual grade in the course. For more information on accreditation,
please ask your instructor or visit: http://www.engineerscanada.ca

Page 2 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

Indicators
Attributes Measurement Method(s)
Number Description
Knowledge Base Competence in Specialized
1.4 Labs, Exams
for Engineering Engineering Knowledge
Proposes problem solutions
supported by substantiated
Problem Analysis 2.2 Labs, Project, Exams
reasoning, recognizing the
limitations of the solutions.
Explores a breadth of potential
solutions, considering their
Labs, Project
Design 4.2 benefits and trade-offs as they
relate to the project
requirements.
Evaluates engineering tools,
Use of
identifies their limitations, and
Engineering 5.1 Labs, Project, Exams
selects, adapts, or extends them
Tools
appropriately.
Use of
Successfully uses engineering
Engineering 5.2 Labs, Project, Exams
tools.
Tools

ASSUMED KNOWLEDGE
Writing programs in Python to solve simple problems.

COURSE MATERIALS

Recommended Texts:
[1] Brian W. Kernighan, Dennis M. Ritchie “C Programming Language” 2nd edition.

[2] S. B. Zakhour, S. Kannan, and R. Gallardo, The Java Tutorial: A Short Course on the Basics,
5th Ed., Addison - Wesley, ISBN: 0132761696.

[3] Bruce Eckel, “Thinking in Java”, 4th Ed., Prentice Hall, 2006, ISBN: 0131872486.

Asynchronous Lab and Project Tools:


Software: Visual Studio Code, all details are provided in the first lab (i.e., Lab 0).

Calculator: Only the McMaster Standard Calculator (Casio FX-991 MS or MS Plus) is permitted
in tests and examinations. This is available at the Campus Store.

Other: Lecture notes, lab / project manuals, and pre-lecture videos.

Page 3 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

COURSE OVERVIEW

Week Topic
1 Introduction to C, Python to C through simple examples, basic data types in C, C
functions and prototypes, C scope of fields, course project overview.
2 C primitive data types and operators, console and file I/O, selection and repetition
statements; structured program development.
2 C primitive arrays, strings, qualifiers.

3 Debugging, C structures, arrays of structures, structures and functions.

3 Pointers, pass by pointer / reference / value, pointers and primitive arrays.

4 Computer memory structure, dynamic memory allocation, array of pointers.

4 C modularizations, memory management tips, Introduction to C++.

5 Object-oriented programming principles, C++ classes implementation, UML diagram,


project briefing.
5 Inheritance.

6 Array list, Array list applications

6 Project sprint and debriefing, polymorphism.

7 C++ template classes, recursion.

At certain points in the course, it may make good sense to modify the schedule. The instructor
may modify elements of the course and will notify students accordingly (in class, course website).

LABORATORY AND PROJECT OVERVIEW

Lab Topic
0 Introduction, environment setup, version control, debugger and memory profiler, and unit testing.

1 Test-Driven Experiment – Write simple C programs using loops and decision statements, arithmetic,
relational and logic operators.
Project Preparation Activity 1 (PPA1) – Basic program setup and non-blocking interactive program
design.

2 Test-Driven Experiment – Write programs using C functions and arrays.


Project Preparation Activity 2 (PPA2) – Animated programs and interactive design using finite state
machine.

3 Test-Driven Experiment – Write programs using C strings, pointers, arrays of strings, dynamic
memory allocation, structures.
Project Preparation Activity 3 (PPA3) – Interactive C Program – McMaster ECE Scavenger Hunt!

4 Test-Driven Experiment – Classes, arrays, and dynamic memory allocation in C++.


Mini Project (2-Week) - Interactive C++ Program with OOD – Topic to be announced in class.

Page 4 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

LABORATORY OPERATION

• Lab Experiments: Every student must conduct the lab experiment individually and
asynchronously.
• TAs will be present in the lab time slot to provide help to students (in addition to their office
hours). However, in-person PPA demos will take place in the lab time slot (see below).
• Project Preparation Activities (PPAs): Every student must conduct the project
preparation activities individually and asynchronously. In-class guided development will
be provided as needed. In-person feature-based evaluation will be carried out after each
PPA is due in the lab time slot.
• Project: A group project to be conducted by a team of two students asynchronously. In-
class guided development will be provided as needed. Peer evaluation and teaching team
evaluation will be deployed. It will be announced later whether an in-person demo is
required.
• Submission Requirements: Students need to submit their activity outcomes (for labs
and PPAs) on github classroom on the due date described in the lab/PPA manual. No late
submission will be accepted. No uncompilable solutions will be accepted.

ASSESSMENT

Component Weight
Labs (5) 20 %
Project (1) + Preparation Activities (3) 20 %
Mid-term Exam (1) 20 %
Final Exam (1) 40 %
Total 100 %

Grading and Evaluation Policies


• There are five (5) labs, three (3) project preparation activities, one (1) course project, one (1)
mid-term exam, and one (1) final exam to be evaluated in this course.
• Use of books, notes, other copied materials, cell phones are not allowed during exams.
• No make-up midterm tests will be granted. Weight of a missed midterm test will be transferred
to the final exam provided an approved MSAF is received.
• The use of generative artificial intelligence (AI) tools like ChatGPT is prohibited in this course.

ACADEMIC INTEGRITY

You are expected to exhibit honesty and use ethical behaviour in all aspects of the learning
process. Academic credentials you earn are rooted in principles of honesty and academic
integrity. It is your responsibility to understand what constitutes academic dishonesty.

Page 5 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

Academic dishonesty is to knowingly act or fail to act in a way that results or could result in
unearned academic credit or advantage. This behaviour can result in serious consequences, e.g.,
the grade of zero on an assignment, loss of credit with a notation on the transcript (notation reads:
“Grade of F assigned for academic dishonesty”), and/or suspension or expulsion from the
university. For information on the various types of academic dishonesty please refer to the
Academic Integrity Policy, located at https://secretariat.mcmaster.ca/app/uploads/Academic-
Integrity-Policy-1-1.pdf
The following illustrates only three forms of academic dishonesty:
• plagiarism, e.g., the submission of work that is not one’s own or for which other credit has been
obtained.
• improper collaboration in group work.
• copying or using unauthorized aids in tests and examinations.

Furthermore, the use of generative artificial intelligence (AI) tools like ChatGPT is prohibited in all
components of this course (COMPENG 2SH4), i.e., you must not use them when doing labs,
project preparation activities, and course project. Failure to comply will be considered as breach
of academic integrity.

AUTHENTICITY / PLAGIARISM DETECTION

Some courses may use a web-based service (Turnitin.com) to reveal authenticity and ownership
of student submitted work. For courses using such software, students will be expected to submit
their work electronically either directly to Turnitin.com or via an online learning platform (e.g., A2L,
etc.) using plagiarism detection (a service supported by Turnitin.com) so it can be checked for
academic dishonesty.

Students who do not wish their work to be submitted through the plagiarism detection software
must inform the instructor before the assignment is due. No penalty will be assigned to a student
who does not submit work to the plagiarism detection software. All submitted work is subject to
normal verification that standards of academic integrity have been upheld (e.g., on-line search,
other software, etc.). For more details about McMaster’s use of Turnitin.com please go to
www.mcmaster.ca/academicintegrity.

COURSES WITH AN ON-LINE ELEMENT

Some courses may use on-line elements (e.g., e-mail, Avenue to Learn (A2L), LearnLink, web
pages, capa, Moodle, ThinkingCap, etc.). Students should be aware that, when they access the
electronic components of a course using these elements, private information such as first and last
names, usernames for the McMaster e-mail accounts, and program affiliation may become
apparent to all other students in the same course. The available information is dependent on the
technology used. Continuation in a course that uses on-line elements will be deemed consent to
this disclosure. If you have any questions or concerns about such disclosure, please discuss this
with the course instructor.

Page 6 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

Some courses may use online proctoring software for tests and exams. This software may require
students to turn on their video camera, present identification, monitor and record their computer
activities, and/or lock/restrict their browser or other applications/software during tests or exams.
This software may be required to be installed before the test/exam begins.

COPYRIGHT AND RECORDING

Students are advised that lectures, demonstrations, performances, and any other course material
provided by an instructor include copyright protected works. The Copyright Act and copyright law
protect every original literary, dramatic, musical and artistic work, including lectures by University
instructors.

The recording of lectures, tutorials, or other methods of instruction may occur during a course.
Recording may be done by either the instructor for the purpose of authorized distribution, or by a
student for the purpose of personal study. Students should be aware that their voice and/or image
may be recorded by others during the class. Please speak with the instructor if this is a concern
for you.

CONDUCT EXPECTATIONS

As a McMaster student, you have the right to experience, and the responsibility to demonstrate,
respectful and dignified interactions within all of our living, learning and working communities.
These expectations are described in the Code of Student Rights & Responsibilities (the “Code”).
All students share the responsibility of maintaining a positive environment for the academic and
personal growth of all McMaster community members, whether in person or online. It is essential
that students be mindful of their interactions online, as the Code remains in effect in virtual
learning environments. The Code applies to any interactions that adversely affect, disrupt, or
interfere with reasonable participation in University activities. Student disruptions or behaviours
that interfere with university functions on online platforms (e.g. use of Avenue 2 Learn, WebEx or
Zoom for delivery), will be taken very seriously and will be investigated. Outcomes may include
restriction or removal of the involved students’ access to these platforms.

ACADEMIC ACCOMMODATIONS

Students with disabilities who require academic accommodation must contact Student
Accessibility Services (SAS) at 905-525-9140 ext. 28652 or sas@mcmaster.ca to make
arrangements with a Program Coordinator. For further information, consult McMaster University’s
Academic Accommodation of Students with Disabilities policy.

Students requiring academic accommodation based on religious, indigenous or spiritual


observances should follow the procedures set out in the RISO policy. Students should submit
their request to their Faculty Office normally within 10 working days of the beginning of term in
which they anticipate a need for accommodation or to the Registrar's Office prior to their
examinations.

Page 7 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

Students should also contact their instructors as soon as possible to make alternative
arrangements for classes, assignments, and tests.

REQUESTS FOR RELIEF FOR MISSED ACADEMIC WORK

McMaster Student Absence Form (MSAF): In the event of an absence for medical or other
reasons, students should review and follow the Academic Regulation in the Undergraduate
Calendar “Requests for Relief for Missed Academic Term Work”.

EXTREME CIRCUMSTANCES

The University reserves the right to change the dates and deadlines for any or all courses in
extreme circumstances (e.g., severe weather, labour disruptions, etc.). Changes will be
communicated through regular McMaster communication channels, such as McMaster Daily
News, A2L and/or McMaster email.

www.eng.mcmaster.ca/ece
013

Electrical and Computer Engineering Lab Safety

Information for Laboratory Safety and Important Contacts


This document provides important information for the healthy and safe operation of ECE
instructional laboratories. This document is required reading for all laboratory supervisors,
instructors, researchers, staff, and students working in or managing instructional laboratories in
ECE. It is expected that revisions and updates to this document will be done continually. A
McMaster University lab manual is also available to read in every laboratory and online:
https://hr.mcmaster.ca/app/uploads/2019/07/McMaster-Lab-Manual.pdf

General Health and Safety Principles


Good laboratory practice requires that every laboratory worker and supervisor observe the
following whether conducting lab work at school or at home:
1. Food and beverages are not permitted in the instructional laboratories.
2. A Laboratory Information Sheet on each lab door identifying potential hazards and emergency
contact names should be known.
3. Laboratory equipment should only be used for its designed purpose.

Page 8 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

4. Proper and safe use of lab equipment should be known before using it.
5. The course TA leading the lab should be informed of any unsafe condition.
6. The location and correct use of all available safety equipment should be known.
7. Potential hazards and appropriate safety precautions should be determined, and the sufficiency
of existing safety equipment should be confirmed before beginning new operations.
8. Proper waste disposal procedures should be followed.
9. Personal ergonomics should be practiced when conducting lab work. https://bit.ly/3fOE71E
10. Current University health and safety issues, and protocols should be known.
https://hr.mcmaster.ca/resources/covid19/workplace-health-and-safety-guidance-during-covid-
19/

Location of Safety Equipment in ECE Labs


Fire Extinguisher First Aid Kit
On walls in halls outside of labs ITB A111, or dial “88” after 4:30 p.m.

Telephone Fire Alarm Pulls


On the wall of every lab near the door Near all building exit doors on all floors

Who to Contact
Emergency Medical / Security: On McMaster University campus, call Security at extension 88 or
905-522-4135 from a cell phone.
Non-Emergency Accident or Incident: Immediately inform the TA on duty or Course Instructor.
University Security (Enquiries / Non-Emergency): Dial 24281 on a McMaster phone or dial 905-
525-9140 ext. 24281 from a cell phone.
See TA or Instructor: For problems with heat, ventilation, fire extinguishers, or immediate
repairs.
Environmental & Occupational Health Support Services (EOHSS): For health and safety questions
dial 24352 on a McMaster phone or dial 905-525-9140 ext. 24352 from a cell phone.
ECE Specific Instructional Laboratory Concerns: For non-emergency questions specific to the
ECE laboratories, please contact 24103.

In Case of a Fire (On Campus Dial 88)


When calling to report a fire, give name, exact location, and building.
1. Immediately vacate the building via the nearest Exit Route. Do not use elevators!
2. Everyone is responsible for knowing the location of the nearest fire extinguisher, the fire alarm,
and the nearest fire escape.
3. The safety of all people in the vicinity of a fire is of foremost importance. But do not endanger
yourself!
4. In the event of a fire in your work area shout “Fire!" and pull the nearest fire alarm.

Page 9 of 10
COMPENG 2SH4
Section/s: C01
Academic Year: 2023/24
Term: Spring

5. Do not attempt to extinguish a fire unless you are confident it can be done in a prompt and safe
manner utilizing a hand-held fire extinguisher. Use the appropriate fire extinguisher for the specific
type of fire. Most labs are equipped with Class A, B, and C extinguishers. Do not attempt to
extinguish Class D fires which involve combustible metals such as magnesium, titanium, sodium,
potassium, zirconium, lithium, and any other finely divided metals which are oxidizable. Use a fire
sand bucket for Class D fires.
6. Do not attempt to fight a major fire on your own.
7. If possible, make sure the room is evacuated; close but do not lock the door and safely exit the
building.

Clothing on Fire
Do not use a fire extinguisher on people.
1. Douse with water from safety shower immediately or
2. Roll on floor and scream for help or
3. Wrap with fire blanket to smother flame (a coat or other non-flammable fiber may be used if
blanket is unavailable). Do not wrap a standing person; rather, lay the victim down to extinguish
the fire. The blanket should be removed once the fire is out to disperse the heat.

Equipment Failure or Hazard


Failure of equipment may be indicative of a safety hazard - You must report all incidents.
Should you observe excessive heat, excessive noise, damage, and/or abnormal behaviour of the
lab equipment:
1. Immediately discontinue use of the equipment.
2. In power labs, press wall-mounted emergency shut-off button.
3. Inform your TA of the problem.
4. Wait for further instructions from your TA.
5. TA must file an incident report.

Protocol For Safe Laboratory Practice


In general, leave equipment in a safe state when you finish with it. When in doubt, consult the
course TA.

Defined Roles
TA The first point of contact for lab supervision
ECE Lab Supervisor Steve Spencer- ITB 147 spencers@mcmaster.ca
ECE Chair Mohamed Bakr- ITB A111 mbakr@mcmaster.ca
ECE Administrator Shelby Gaudrault- ITB A111/B gaudraus@mcmaster.ca
ECE Course Instructor Please contact your specific course instructor directly

Page 10 of 10

You might also like