Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ms N Nashandi Dr SH Nggada Week 1 - Introduction to Advanced Programming.

Similar presentations


Presentation on theme: "Ms N Nashandi Dr SH Nggada Week 1 - Introduction to Advanced Programming."— Presentation transcript:

1 Ms N Nashandi Dr SH Nggada Week 1 - Introduction to Advanced Programming

2 Outline We shall be covering the following Lecturers introduction Course Introduction Large and complex software project What makes a project successful? Chief reasons for software project failures The C++ programming language Creating a C++ project(To be covered in the practical sessions) Namibia University of Science and Technology 22016/01/03Ms N Nashandi and Dr SH Nggada

3 Lecturers’ Introduction Lecturer & Primary Coordinator: Ms Nashandi Office: 5 Storch Street Email: nnashandi@nust.na Ext: Practical lecturer: Mr M Abia Office: Poly Heights Email: mabia@nust.na Ext: 32016/01/03Ms N Nashandi and Dr SH Nggada

4 Making an Appointment By Phone Call the extension (ext) to book and appointment. Please, do not call either lecturer on their mobile phones By Email Use the following rules: Subject: Appointment Content: Specify precisely the purpose of the appointment and suggest at least 1 date and time An email sample is shown on the next slide 42016/01/03Ms N Nashandi and Dr SH Nggada

5 Appointment by Email - Sample To: nnashandi@nust.na Subject: Appointment Body Please can I see you on any of the following dates and time: Monday, 22 February 2016, 11:00am Wednesday, 24 February 2016, 2:00pm I would like you to explain to me more on deep copying. Thank you, Name and student number 52016/01/03Ms N Nashandi and Dr SH Nggada

6 CLASS REPRESENTATIVE 62016/01/03Ms N Nashandi and Dr SH Nggada Class representative(s) will be required if class size is greater than or equal to 10 2 class representatives will be ideal (1 male and 1 female) The role of a class representative (CR) is to look after the interests of fellow students as it pertains to teaching and learning. However, such interests must be in line with the course outline and must also conform to the University regulations. Thus, a CR acts as a link between fellow students and the coordinating team of the course. Duties includes Regularly compiling the concerns of students as it relates the course Attend any scheduled meeting with the coordinating team

7 Course Introduction Pre-requisites Data Structures and Algorithms (DSA610S) Notional hours – 100 Contact hours – 35 Lectures Labs (Practical) Consultations Self study hours – 65 After class reading Exercises Assignments Review and revision etc 72016/01/03Ms N Nashandi and Dr SH Nggada

8 Course Introduction Lecture 11 - 12 weeks 1 hour (Theory) Full-Time (Theory) Fridays, 14:00pm – 15:00pm Venue: Lecture block(303) Part-Time (Theory) Thursdays, 6:35pm – 8:00pm Venue: Lecture block(211) 82016/01/03Ms N Nashandi and Dr SH Nggada

9 Course Introduction Lab 2 hours (practical) There are several practical groups Consult the time table to know your practical days and time Practical will start in week 2 Should you have a reason to change your practical group, first discuss with the practical group lecturer Course Materials Located at: isnotes\06 - Department of Computer Science\07BACS Bachelor of Computer Science\APG710S Advanced Programming Available on Moodle Lab materials will be made available before the lab 92016/01/03Ms N Nashandi and Dr SH Nggada

10 Course Introduction (Cont) Class Structure Lectures Class exercises may be introduced appropriately Modes of Assessment 2 Tests (each contributes 20% to the semester mark) 1 Individual Assignment (contributes 30% to the semester mark, each lab would be a build-up to this assignment) Examination (contributes 50% to the final mark) 10 There will be supplementary test, however tests 1 and 2 may be much easier therefore, strive to do very well in tests 1 and 2. 2016/01/03Ms N Nashandi and Dr SH Nggada

11 Course Description Aim This course is designed to expose students to advanced programming techniques necessary for the development of large, complex software projects. The course will also enable students to develop good quality software; such as modularity, efficiency, reliability and encapsulation. Additionally, it will expose the student to tools used in code analysis. This course will use C++ as the language of instruction and implementation 112016/01/03Ms N Nashandi and Dr SH Nggada

12 Learning Outcome Upon successful completion of the course the student should be able to: 1. Compare and contrast the challenges of programming in C++ and C# or Java 2. Demonstrate knowledge and understanding of efficiency and robustness 3. Evaluate and apply advanced programming concepts 4. Develop a robust, efficient and real-time C++ application 5. Use an integrated development environment (IDE) to create, debug and optimise a well-structured implementation in C++ 122016/01/03Ms N Nashandi and Dr SH Nggada

13 Course Outline Introduction to Advanced Programming Variables, types, expressions and functions Control Structure Modularity Further Data Types File input and output Standard template library Code Analysis and Test Recursion 132016/01/03Ms N Nashandi and Dr SH Nggada

14 Recommended Materials Prescribed text Gregoire, M., Solter, N. A. & Kleper, S. J. (2011). Professional C++ (2nd ed.). John Wiley & Sons. ISBN-10: 0470932449 Recommended Reading James O. & Coplien, J. O. (1991). Advanced C++ programming styles and idioms (1st ed.). Addison Wesley, ISBN-10: 0201548550 Josuttis, N. M. (2012). The C++ standard library: A tutorial and reference (2nd ed.). ISBN-10: 0321623215 Meyers, S. (2005). Effective C++: 55 specific ways to improve your programs and designs (3rd ed.). Addison Wesley. ISBN-10: 0321334876 142016/01/03Ms N Nashandi and Dr SH Nggada

15 Software Tool Any of the following software tools will do for this course: Microsoft Visual Studio 2010-2015 (full version) Microsoft Visual Studio 2010-2015 Express for Desktop Microsoft Visual C++ 2010-2015 Express for Desktop You can download your own copy from Microsoft website: https://www.visualstudio.com/downloads/download-visual-studio-vs Officially we shall be using Microsoft tool but personally you can use any other C++ tool 152016/01/03Ms N Nashandi and Dr SH Nggada

16 Class Rules Come on time No noise No sleeping or dozing No eating You can drink water or soft-drink but not alcohol, Make sure you dispose the can/jar appropriately No littering No walking around No use of mobile phone If you need to leave the class and not return within 5 – 7 minutes, then signal your exit Respect the opinion of colleagues In general, act appropriately 162016/01/03Ms N Nashandi and Dr SH Nggada

17 Large and Complex Software Project? According to 1 Jeff Worley(2012), project that are hard are not necessary complex. There are four elements to project complexity  Technical complexity  Cost complexity  Schedule complexity  Political complexity “Most ‘hard’ projects are ones that are in trouble, usually caused by cost, schedule or performance issues which require an unending amount of re-programming forcing constant schedule changes, personnel changes and cost containment measures” (Jeff Worley,2012) 2016/01/03Ms N Nashandi and Dr SH Nggada17 1 Jeff Worley – https://iccpm.com/content/what-complex-project-management

18 Technical complexity There are many of the reasons that could leads to project complexity such as technology, significant systems engineering, large complex software development, multiple integrated interfaces and interfacing with multiple complementary projects, programs, systems and users. Technologies which are not yet completely developed and require more iteration and development before reaching required TRL levels, require close attention. They also require alternate approaches if the technology stalls in development. 2016/01/03Ms N Nashandi and Dr SH Nggada18

19 Cost complexity money is always a complexity. From not having enough to achieve desired requirements to how the money is phased (timing) to the project. Probably the most complex is getting it. 2016/01/03Ms N Nashandi and Dr SH Nggada19

20 Schedule Complexity Time is always the enemy because time is money and money is always tight. Technologies or difficult engineering tasks that lay in the critical path also complicate schedule because of the risks associated with them. Many projects cannot move from one phase to next without these critical path tasks completed. This leads to schedule risks and requires complex master program plans and master schedules, work breakdown structures and detailed integrated schedules that connect all the required interfaces. 2016/01/03Ms N Nashandi and Dr SH Nggada20

21 Political complexity Usually you must deal with federal, state and local governments. This element entails ideology, political parties, money, priorities, environment and public need. This requires a detailed political plan which constantly requires personally touching and communicating with politicians and maintaining a public campaign highlighting the goodness of the project. The campaigns should focus on the public’s interests such as national defence, scientific achievement, public utility and jobs. Keeping the project “sold” is a large and complex component of program management. 2016/01/03Ms N Nashandi and Dr SH Nggada21

22 What makes a project successful? On time delivery Feature set complete Reliable Performant Meets expectations On budget Team survive without burnout(!) Ability to evolve ( enhanceable, maintainable) 2016/01/03Ms N Nashandi and Dr SH Nggada22

23 Chief reasons for software project failures Cost overruns Changing of requirements Misunderstanding of requirements Poor understanding of goals Over-ambitious goals Lack of clear specification Poor planning/research Lack of a reasonable & structured software/feature plan No commercial market for end product Complexity of software 2016/01/03Ms N Nashandi and Dr SH Nggada23

24 You can refer to the following link for further details : What is Complex Project Management? Retrieved from : https://iccpm.com/content/what-complex-project-management https://iccpm.com/content/what-complex-project-management (2016)for teaching material purpose 2016/01/03Ms N Nashandi and Dr SH Nggada24

25 Summary This week we have: Introduced the lecturers for the course Introduced the course Introduced approaches to solving real life problems, some of which we will apply in this course Next week we shall cover: Introduction to Programming Languages 252016/01/03Ms N Nashandi and Dr SH Nggada

26 The C++ Programming Language C++ is an Object Oriented Programming Language. It was developed by Bjarne Stroustrup in early 1980s at AT & T Bell Laboratories Stroustrup, an admirer of Simula67 and strong supporter of C, wanted to combine the best of both the languages and create a more powerful language that could support object-oriented programming features and still retain the power and elegance of C. The result was C++. Therefore, C++ is an extension of C with a major addition of the class construct feature of Simula67. Since the class was a major addition to the original C language Stroustrup initially called the new language ‘C with classes’. However, later in 1983, the name was changed to C++. The idea of C++ comes from the C Increment operator ++, thereby suggesting that C++ is an augmented – incremented version of C. 2016/01/04NUST Advanced Programming26

27 Evolution of C++ C (1972) ANSI Standard C (1989) Bjarne Stroustrup adds features of the language Simula (an object- oriented language designed for carrying out simulations) to C resulting in … C++ (1983) ANSI Standard C++ (1998) ANSI Standard C++ [revised] (2003) ANSI Standard C++ (2011) The present C++  A general-purpose language that is in widespread use for all forms of systems including embedded and real-time systems  The most commonly used language for developing system software such as databases and operating systems 2016/01/04NUST Advanced Programming27

28 C++ Features 2016/01/04NUST Advanced Programming28

29 General C++ Program // Program description #include directives Using int main() { constant declarations variable declarations executable statements return 0; } The portions of the program shown in blue should always be present. The declarations specify the data that is used by the program. These declarations can declare either constants or variables, for example. The statements specify the algorithm for the solution to your problem. 2016/01/04NUST Advanced Programming29

30 C++ Compiler Directives Preprocessor directive Compiler directives appear in blue in Visual C++. The #include directive tells the compiler to include some already existing C++ code in your program. The included file is then linked with the program. There are two forms of #include statements: #include //for pre-defined files #include "my_lib.h" //for user-defined files iostream is C++ library of input/output functions, that includes cout and cin NB: Do not use ; at end of #include statement 2016/01/04NUST Advanced Programming30

31 The namespace directive This directive allows the cout and cin statements to be used in a program without using the prefix std:: With this directive, we may write cin or cout Otherwise, we would have to write std::cout or std::cin Must use ; at end of namespace directive 2016/01/04NUST Advanced Programming31 #include using namespace std; int main() { declaration(s) statement(s) return 0; }

32 Keywords aka “reserved words” Keywords appear in blue in Visual C++. Each keyword has a predefined purpose in the language. Do not use keywords as variable and constant names!! 2016/01/04NUST Advanced Programming32

33 Comments in C++ Comments appear in green in Visual C++. Comments are explanatory notes; they are ignored by the compiler. There are two ways to include comments in a program: // A double slash marks the start of a //single line comment. /* A slash followed by an asterisk marks the start of a multiple line comment. It ends with an asterisk followed by a slash. */ 2016/01/04NUST Advanced Programming33

34 Programming Style C++ is a free-format language, which means that: Extra blanks (spaces) or tabs before or after identifiers/operators are ignored. Blank lines are ignored by the compiler just like comments. Code can be indented in any way. There can be more than one statement on a single line. A single statement can continue over several lines. 2016/01/04NUST Advanced Programming34

35 Programming Style (cont. ) In order to improve the readability of your program, use the following conventions: Start the program with a header that tells what the program does. Use meaningful variable names. Document each variable declaration with a comment telling what the variable is used for. Place each executable statement on a single line. A segment of code is a sequence of executable statements that belong together. Use blank lines to separate different segments of code. Document each segment of code with a comment telling what the segment does. 2016/01/04NUST Advanced Programming35

36 Comparison of C++ to other programming languages: C++ A “better C” (http://www.research.att.com/~bs/C++.html)http://www.research.att.com/~bs/C++.html that supports: Systems programming Object-oriented programming (classes & inheritance) Programming-in-the-large (namespaces, exceptions) Generic programming (templates) Reuse (large class & template libraries) 2016/01/04NUST Advanced Programming36

37 Java and C++ — Similarities and Extensions Similarities: primitive data types (in Java, platform independent) syntax: control structures, exceptions... classes, visibility declarations (public, private) multiple constructors, this, new types, type casting (safe in Java, not in C++) comments Some Java Extensions: garbage collection standard abstract machine standard classes (came later to C++) packages (now C++ has namespaces) final classes autoboxing generics instead of templates 2016/01/04NUST Advanced Programming37

38 Java Simplifications of C++ no pointers — just references no functions — can declare static methods no global variables — use public static variables no destructors — garbage collection and finalize no linking — dynamic class loading no header files — can define interface no operator overloading — only method overloading no member initialization lists — call super constructor no preprocessor — static final constants and automatic in lining no multiple inheritance — implement multiple interfaces no structs, unions, enums — typically not needed 2016/01/04NUST Advanced Programming38

39 Differences between C++ and C# C++ C# compiles down to machine code you must handle memory manually. support the multiple inheritance compiles down to machine code. C# 'compiles' down to CLR, which ASP.NET interprets (roughly) runs in a virtual machine, memory management is handled automatically. does not (although it does have multiple inheritance of interface) 2016/01/04NUST Advanced Programming39

40 For more reading : Bjarne Stroustrup, The C++ Programming Language (Special Edition), Addison Wesley, 2000. 2016/01/04NUST Advanced Programming40

41 Homework What can you abstract from the following? Road Country Student Clinic Patient 412016/01/03Ms N Nashandi and Dr SH Nggada

42 End of Lecture 42 ? 2016/01/03Ms N Nashandi and Dr SH Nggada


Download ppt "Ms N Nashandi Dr SH Nggada Week 1 - Introduction to Advanced Programming."

Similar presentations


Ads by Google