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

01 Week PDF

This document provides an overview of the objectives, structure, assignments, and expectations for Week 1 of a programming course. It introduces the teaching staff and subject coordinators. It then outlines the industry context and need for object-oriented programming skills. The document describes the class structure, including pre-readings, in-class exercises, and building of knowledge towards assignments. It provides details of 5 programming assignments and code reviews. It also lists the recommended tools, such as Ubuntu, CMake, and gTest. Finally, it includes examples of concepts to be covered in class, such as pointers, arrays, loops, and functions.

Uploaded by

Shandi hasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views

01 Week PDF

This document provides an overview of the objectives, structure, assignments, and expectations for Week 1 of a programming course. It introduces the teaching staff and subject coordinators. It then outlines the industry context and need for object-oriented programming skills. The document describes the class structure, including pre-readings, in-class exercises, and building of knowledge towards assignments. It provides details of 5 programming assignments and code reviews. It also lists the recommended tools, such as Ubuntu, CMake, and gTest. Finally, it includes examples of concepts to be covered in class, such as pointers, arrays, loops, and functions.

Uploaded by

Shandi hasi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Week 1

◦ Staff
◦ Link to Industry Needs
◦ Objectives
◦ Class Structure
◦ Assignments
◦ General Rules
 Plagiarism
 Late submissions
 Peer Review
◦ In-class exercises
 Subject Coordinators
◦ Alen Alempijevic
◦ Robert Fitch
 Teaching Staff
◦ Alex Virgona
 6.4B Devices Interconnected + System on
 Chip Devices Explosion
 Beyond Single Monolithic Code
 OO Paradigm – More Admissible to Systems
 C++ Essential on Many Layers
◦ Android Backbone, Libraries, Applications
 Code Reuse / Testing / Documentation
 Robotics Jobs (demand)
 1. Design classes that are reusable, reliable and
maintainable
 2. Apply theoretical knowledge of sensors and
control to practical programming problems
 3. Select appropriate class structures and data
handling methods for task at hand
 4. Implement and test object-oriented
applications of moderate complexity
 5. Communicate programming design decisions,
dependencies, interconnections, use cases and
testing procedures in a written document
 Pre-readings given
 Students view readings, attempt and come to
class
 We clarify concepts and push forward with
examples
 We build knowledge base (stratify knowledge)
towards the assignments; more complex
layers of understanding
 1) Assessment I:
Developing Sensor Class (5%)
 2) Assessment II:
Utilising Abstraction for a Range of Sensor
Classes (20%)
 3) Assessment III:
Threading, Synchronization and Data Integrity
(20%)
 4) Individual Project: (40%)
 5) Code Review: (15% : 5%+5%+5%)
 OS: Ubuntu
 Compilation + Tools: CMake
 Documentation: Doxygen
 IDE: QTCreator
 Unit Testing: gtest
 Academic Conduct
◦ Plagiarism
 Late submissions
◦ Refer to Subject outline
 Google Forms
◦ Will be used for feedback (peer review)
◦ Peer reviews will also be distributed (anonymous)
 Feedback
◦ Provided on each assignment on UTS Online with
associated Rubric
 Download the examples from Lynda.com
 Enable compiling of working.cpp from Chap1
 with CMake
◦ Command line
◦ QTCreator / Eclipse
 ESSENTIAL FOR PASSING ARGUMENTS

 Assign a double x of value 41012;


 Use a pointer ip to point to x
 Print the value of what ip is pointing to
 Make y reference to x
 Print the value of what y is referencing to
 Create a double z of value 1
 Use a pointer ip to point to z
 Make y to reference to z
 Print the value of what ip and y is referencing to
 HAVE TO BE SAME TYPE ELEMENTS!
 CAN USE ARRAY NOTATION [i] OR POINTER

 Create an array x of doubles with 10


elements
◦ Populate the elements of array on creating of array,
each element [i] has value i (INITIALISER LIST)
◦ Can you create a loop to populate elements of x
(each x[i] =i), how to code end of loop?) – (USE
MACRO)
◦ Can you use a pointer and loop to initialise
elements of array (*ip++)
 Create an string array (char[]) x to value “41012”
◦ do we need to specify size on initialisation?
◦ Initialise with (INITIALISER LIST)
◦ Can you create a loop to show elements x[i] (how to
code end of loop, can we have a check for NULL, what is
x[i]?)
◦ Can you use a pointer and loop to print elements
(*ip++)

 ADVANCED, Why does x[i]=NULL work for char[]


for termination of loop, and will not work for
double[]
 LOOPING – TERMINATION
 TYPE-CASTING?
 Create an string array (char[]) x to value
“41012”
◦ Can we typecast to integer each value (and what the
value of each integer is?) (int)(x[i])
◦ Add up all the elements (as numbers)?
◦ Can we count number of elements less than 2
 Use a for loop
 Use a while loop
 ADVANCED: Use a for range loop
 Create an string array (char[]) x to value
“41012”
◦ Switch on items 4,1,0,2 and print word for value
(what type needs to be in case clause?)
 Create a function that accepts a double value as a
parameter and
◦ 1. Returns a square value
◦ 2. Returns a bool value if the double is greater than zero
and the square value instead of initial passed value
◦ 3. Returns bool value if the double is greater than zero,
the square value, the cube value and the passed value
incremented by one
◦ 4. Loop over item 3 for 1-20

 ADVANCED: How best protect the passed value?


 Create a structure called Sensor than contains
◦ Number of samples (numSamples)
◦ The Samples (they are a double[] value) (samples)
 Pass structure to function and
◦ Populate the structure with a number of samples
and random value samples
 Create a function that increments the number
of samples by one and stores samples as the
natural logarithm of the index number

 ADVANCED: When will the last task fail

You might also like