Dansk - English

Short version - Full version


C++ for Java programmers (Spring 2010)

Course code : EJ2C++-U1
ECTS Credits : 7,5 Status : Optional
Revised : 06/02 2010 Written : 23/06 2005
Placement : 5. semester Hours per week : 4
Length : 1 semester Teaching Language : Danish and English

Objective : C/C++ still holds the absolute leading position in the Open Source community. The amount of existing and still active C/C++ code lines is immense.
The course will focus on differences with Java. Java does many things behind scene; C/C++ has more freedom but is often regarded as more complicated when handling the larger freedom.
The goal is to handle C/C++ especially concerning the many choices this language enables you to use. The expertise you learn in C/C++ will be useful in real job experience in many years from now.

Learning outcomes
(i) Ability to
1. define and identify the basic differences between Java and C/C++
2. define and identify the basic pitfalls using C/C++
3. define and identify basic distinctive features in C/C++
4. identify examples of 2. and 3. in the students own solution
(ii) Ability to
5. analyze the consequences of falling into pitfalls in C/C++
6. analyze some advantages and disadvantages in different generic programming strategies
7. identify and describe examples of 5. In the students own solution
(iii) Ability to
8. discuss solutions involving items listed in the Principal Content
9. reflect on a C/C++ application
10. discuss quibbling pitfalls in C/C++

Evaluation:
02: if the student fulfils the criteria from (i)
7: if further the criteria from (ii) are met
12: if all criteria from (i), (ii), and (iii) are met
Principal Content : • Compilers, linkers, and precompilers.
• Copy constructor, copy assignment operator, and destructor (“big three”).
• Handling of memory. Global, heap, and stack.
• Pointers.
• Templates; Generic programming.
• Operator overloading
• Exceptions
• Inheritance
• Polymorphic behaviors; virtual functions
• Precondition and post condition specifications
• Standard Template Library (STL)
; virtual functions
Teaching method : The lessons consist of theory combined with practical exercises and course assignments. During the semester the student will have to hand in a number of mandatory course assignments. These assignments are used as a base for the oral examination.
Required prequisites : Documented knowledge corresponding to PROG2 and COMP3.
Recommended prerequisites : You are already competent at programming in Java. You may have some experience in C. You should feel confident in design and implement programs using classes and methods. You have used some basic structures like arrays and Arraylists in Java.
Relations : -
Type of examination : Oral examination based on assignments
External examiner : Internal
Marking : 7 step scale
Remarks : Internal, oral examination based on asignments.

7-step scale

02: if the student fulfils the criteria from (i)
7: if further the criteria from (ii) are met
12: if all critertia from (i), (ii), and (iii) are met

Through the course the students will have to solve a number of compulsory course assignments. To be admitted for examination all compulsory assignments have to be handed in within the time limits indicated in the assignment. Furthermore all assignments have to be approved.
Teaching material : Supplementary literature:
Mark Allen Weiss: ”C++ for Java Programmers”, Pearson Prentice Hall, 2004,
ISBN: 0-13-191163-5
Responsible teacher : Henrik Kold Mikkelsen , hokm@dtu.dk