Transition To Object Oriented Programming Oop An Innovative and Hands On Introduction To Linux Oop in C and Arduinos Using Emoro
Transition To Object Oriented Programming Oop An Innovative and Hands On Introduction To Linux Oop in C and Arduinos Using Emoro
Abstract
The United States Coast Guard Academy established a Core Curriculum Review
Task Force in 2011 that submitted recommendations with necessary changes to the
Academy’s core-curriculum. A key recommendation of the Task Force included adding
a freshman year course on computer-based problem solving that would cover modeling
problems and using Microsoft Excel and MathWorks MATLAB. However, curriculum
overlap within Electrical Engineering and Cyber Systems’ sophomore year Introduction
to Computer Programming covering MATLAB and C++ presented the Faculty with the
challenge of adapting this course while retaining C++ content.
Consequently, using ABET best practices as its guiding principle, a second Program
Review was held in the summer of 2017 where it was decided that a 2.0 credit course
that included both Linux and C++ would be the best option. This paper presents in
detail the conception, design and implementation of a 2.0 credit, highly-interactive
and hands-on course titled Transition to Object Oriented Programming (TOOP). The
paper specifically discusses the adoption of a home-grown Training Wheels platform
within the Ubuntu operating system running as a virtual machine, C++ programming
with Eclipse integrated development environment (also within Ubuntu), and finally
the Arduino at Heart EMoRo robot.
1 Introduction
Education is a constantly evolving, ever-grounded process of systematic instruction that
transmits information for the reception of students. In the forming of constructive minds
and hearts. As advances in knowledge occur, both the methods and content of education
1
must adapt to enable the best intellectual development and character building. While Charles
Babbage designed the first mechanical computer as early as 1822 [1], the digital computers
are relatively new and have been with us since the 1930s [2]. In recent years, computer
programming has shifted from being a skill for an elect few computer scientists to entering
the main stream of education [3].
At the United States Coast Guard Academy (USCGA), learning computer programming
has been an integral part of the Electrical Engineering curriculum for decades. While initially
focused on hardware-friendly languages like C and C++, this was later expanded to include
MATLAB and C#. In keeping with the principle of continuous improvement and providing our
students with the best learning experience possible, a Core Curriculum Review was initiated
in 2011. This group, formally named the Core Curriculum Review Task Force, submitted
their recommendations with necessary changes to USCGA core-curriculum.
A key recommendation of the Task Force included adding a freshman year course on
computer-based problem solving. Various departments began to collaborate on what this
course should cover and which language, if any, should be included. Ultimately the Electri-
cal Engineering and Cyber Systems Section took the lead for the STEM majors and built
the Introduction to Computing course that covers modeling problems and using Microsoft
Excel [4] and MathWorks MATLAB [5].
As a result of this addition to the core-curriculum, the Program of Study within the
Electrical Engineering and Cyber Systems majors had to adjust given the new curricula
overlap within their sophomore year Introduction to Computer Programming course that
covered MATLAB and C++. This presented the Faculty with an exciting opportunity and
challenge in adapting this course while retaining C++ content. Consequently, using ABET
best practices as its guiding principle, a second Program Review was held in the summer of
2017. During this series of meetings, it was decided that the C++ content was still important
to the program and should be retained.
In addition, some faculty expressed a strong desire for our students to be exposed to the
Linux operating system (OS). In the end it was decided that a 2.0 credit course would be
the best option. Thus was born the highly-interactive and hands-on course titled Transition
to Object Oriented Programming (TOOP).
1.1 Roadmap
The remainder of this paper is organized as follows. Course overview of TOOP is discussed in
Section 2. Section 2.1 discusses the Linux portion. The C++ portion is covered in Section 2.2.
The integration of both of these subjects through the use of the EMoRo robot is discussed in
Section 3. Lessons learned are presented in Section 4 and the paper concludes with Section 5.
2
2 Course Overview
The official USCGA catalog entry for this course is as follows:
Building upon the procedural and high level programming introduced in I2C,
this course launches into the world of Object Oriented Programming and
Design using the lower level language of C++. Key concepts of OOP are
covered including classes, properties, methods, constructors, destructors,
overloading, and inheritance. This treatment is conducted within the Linux
operating system to expand the students’ exposure to another operating system
and in preparation for further study of Operating Systems, Computer & Network
Security, and potential use in Capstone Projects.
It is a required course for all Electrical Engineering and Cyber Systems students and open
to any other student who has successfully completed the new Introduction to Computing
course. The TOOP course is designed to meet twice a week. In its first offering, it had
28 students and two instructors which reflects the high student:teacher ratio reflective of
USCGA and the hands-on nature of this course. Thus is was somewhat of a hybrid lec-
ture/lab (active learning) configuration. The first 15 − 20 minutes were often devoted to a
brief lecture to introduce that day’s topic and then the students were provided an in-class
exercise to complete for the remainder of the period.
Once completed, students were encouraged to help others but were able to leave if they
needed/chose to. The students were required to bring their own laptops to class each meeting
(fully charged). A preference for open-source resources existed as outlined below. At the
end of each class, students were required to submit evidence of their completion of each
in-class exercise depending on the assignment (usually a screen shot or code file) and they
were assessed on the completion of the work assigned.
In addition there were quizzes (Linux), homework assignments (C++), and a graded
project (Arduino) which were used for assessment purposed. Late work was accepted within
24 hours for a 15% penalty and 48 hours with a 35% penalty (work was not accepted after
that unless there were emergent circumstances).
3
learning environment where the students’ commands are passed to the actual Ubuntu shell
with results then displayed. For a few years the Academy has been offering a one credit
course to introduce cadets to Linux. This effort resulted in the development of Training
Wheels in 2016 to allow students to learn Linux interactively. Students are introduced to
concepts, asked to perform some task (like show a directory or pipe the output of a grep
command to a file) and then provided guidance on how to successfully complete this if they
do not enter the correct text. While this is an excellent way to learn, the students are
also provided a comprehensive open source textbook to augment this learning entitled Linux
Fundamentals [8] was adopted for students to refer to as well. The topics covered during
these four classes are listed in Table 1.
4
Class Topics
6 Eclipse in Ubuntu
7 Getting Started with Eclipse and Intro to Object Oriented Programming
8 Starting with C++
9 Operators, Expressions, Constants, and Data Types
10 Basic Input/Output (including File I/O)
11 Selection and Loops
12 Functions
13 Name Visibility
14 Arrays (including Character Sequences)
15 Pointers
16 Data Structures
17 Intro to Classes
18 More Classes
19 Special Class Members (Constructors and Destructor)
20 Friendship and Inheritance
21 Polymorphism, Type Conversions, and Preprocessor Directives
Table 2: C++Topics
(a) (b)
one week (week-22 in Table 3) to assemble the parts into a complete EMoRo ready to be
programmed (figure 1(b)) starting week-23 (Table 3).
By having the students actually build and code on an EMoRo robot, they received im-
mediate physical feedback on the accuracy of their programming and subtlety had them
designing classes and implementing methods learned earlier in the semester.
In order to build upon both the Ubuntu OS and Eclipse IDE, the Sloeber [14] IDE
was selected for this portion. Sloeber is a specially modified Eclipse IDE that includes
5
(a) (b)
Figure 2: (a) EMoRo processor board [14]. (b) EMoRo GLAM module [14].
built-in support for Arduino. By using this, students are able to develop their code in a
more “C++-like” fashion (including classes) beyond the typical setup() and loop() constructs
provided by the Arduino IDE [15, 16].
As shown in Table 3, the first six classes of this module are focused on learning Arduino
and some of the many components of the EMoRo, while the final two classes are devoted to
working on and completing the course’s final challenge (see Figure 3 and Appendix-1).
6
(a) (b)
Figure 3: (a) Student team initializing EMoRo. (b) Challenge path for EMoRo final demo.
4 Lessons Learned
While we are very proud of this course and the work that went into developing it, we recognize
that nothing is ever perfect and there is always room for improvement. At the end of the
semester students were asked to provide feedback on the course. We generally view average
scores less than 2.5 as requiring attention, scores between 2.5 and 3.5 as meeting objectives,
and any average score above 3.5 as exceeding objectives.
Based upon this feedback, the biggest area for us to improve upon is graded feedback.
We also believe the topic of Error Catching should be incorporated into the course. This
year the students worked in pairs with a single EMoRo robot (mostly due to the cost of these
robots). We think pair programming can be very helpful in learning, but ultimately it may
be more beneficial for each student to have his or her own robot. This may require identifying
a cheaper robot to make this financially sustainable but only if we are able to locate one
that has the same suite of I/O devices.
5 Conclusion
TOOP represents a great addition to the United States Coast Guard Academy catalog of
courses. Overall, the instructors really enjoyed this course and felt like most of the students
did too based upon written end of course feedback. For some, learning Linux was a challenge
(especially since the only other regular users of Linux right now are select Cyber Team
members and since upper-class students have not taken this course and generally unable to
offer assistance).
Training Wheels was a wonderful way for students to learn at their own pace and
customized to their own learning course. The C++ portion was predominately taught using
7
the tutorial on www.cplusplus.com which is an excellent site. Some examples and material
are more advanced than the class needs, but this was reflected in the lecture notes and slides
(and also provides motivated students the ability to deepen their knowledge). The EMoRo
Arduino robot was a huge success1 . The vast majority of students really enjoyed applying
and seeing what they learned translate into tangible results.
References
[1] Computer Hope, “When was the first computer invented?,” 13 November 2018. [On-
line]. Available: https://www.computerhope.com/issues/ch000984.htm. [Accessed 26
February 2019].
[2] R. McMahon, “Computer History Resources,” in ACM SIGITE, Newark, NJ, 2005.
[3] G. Galvin, “Some Say Computer Coding Is a Foreign Language,” 13 October 2016.
[Online]. Available: http://tinyurl.com/y5rm5khy. [Accessed 26 February 2019].
8
[14] EMoRo, “EMoRo Robot Kit,” [Online]. Available: http://www.emoro.eu/content/
view/emoro-robot-kit/601. [Accessed 26 February 2019].