1 / 16

ECE 264 Object-Oriented Software Development

ECE 264 Object-Oriented Software Development. Instructor: Dr. Honggang Wang Fall 2012 Lecture 1: Introduction. What you should learn in this class.

arch
Download Presentation

ECE 264 Object-Oriented Software Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 264Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 1: Introduction

  2. What you should learn in this class • An understanding, at an introductory level, of the use of objects in requirements, design, implementation, test, and maintenance of software systems • The ability to write C++ programs • The dynamics of working as a team on a project that covers all of the object life cycle • The basics of the software / system process ECE 264: Lecture 1 · To understand the interconnection of the CPU, memory, and I/O

  3. What you’ll really learn … ? http://xkcd.com/844 ECE 264: Lecture 1

  4. Tentative course outline • Brief intro to object-oriented programming • Software life cycle • We’ll introduce in lecture 2; revisit frequently • Class basics: constructors, methods, members • Arrays, vectors, and other container classes • Destructors, pointers, and dynamic memory allocation • Strings • Extending classes • Operator overloading • Inheritance • Polymorphism (virtual functions, abstract classes) • Note: basic programming concepts will be reviewed as needed: control statements, data types, operators, functions ECE 264: Lecture 1

  5. What is a Computer? A computer consists of a CPU, memory, hard disk, monitor, printer, and communication devices.

  6. Programs Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs. Without programs, a computer is an empty machine. Computers do not understand human languages, so you need to use computer languages to communicate with them. Programs are written using programming languages.

  7. Programming Languages Machine Language Assembly Language High-Level Language Machine language is a set of primitive instructions built into every computer. The instructions are in the form of binary code, so you have to enter binary codes for various instructions.Program with native machine language is a tedious process. Moreover the programs are highly difficult to read and modify. For example, to add two numbers, you might write an instruction in binary like this: • 1101101010011010

  8. Programming Languages Machine Language Assembly Language High-Level Language Assembly languages were developed to make programming easy. Since the computer cannot understand assembly language, however, a program called assembler is used to convert assembly language programs into machine code. For example, to add two numbers, you might write an instruction in assembly code like this: ADDF3 R1, R2, R3

  9. Programming Languages Machine Language Assembly Language High-Level Language The high-level languages are English-like and easy to learn and program. For example, the following is a high-level language statement that computes the area of a circle with radius 5: area = 5 * 5 * 3.1415;

  10. Popular High-Level Languages • COBOL (COmmon Business Oriented Language) • FORTRAN (FORmula TRANslation) • BASIC (Beginner All-purpose Symbolic Instructional Code) • Pascal (named for Blaise Pascal) • Ada (named for Ada Lovelace) • C (whose developer designed B first) • Visual Basic (Basic-like visual language developed by Microsoft) • Delphi (Pascal-like visual language developed by Borland) • C++ (an object-oriented language, based on C) • Java (a popular object-oriented language, similar to C++) • C# (a Java-like developed by Microsoft)

  11. Compiling Source Code A program written in a high-level language is called a source program. Since a computer cannot understand a source program. Program called a compiler is used to translate the source program into a machine language program called an object program. The object program is often then linked with other supporting library code before the object can be executed on the machine.

  12. History of C++ C, C++, Java, and C# are very similar. C++ evolved from C. Java was modeled after C++. C# is a subset of C++ with some features similar to Java. If you know one of these languages, it is easy to learn the others. C evolved from the B language and the B language evolved from the BCPL language. BCPL was developed by Martin Richards in the mid-1960s for writing operating systems and compilers. C++ is an extension of C, developed by BjarneStroustrup at Bell Labs during 1983-1985. C++ added a number of features that improved the C language.

  13. Why C++? • C++ embodies the dominant computing paradigm, Object-Oriented Programming (OOP). • Object-oriented programming techniques are more natural than structured programming. You’ll learn both since OOP is built upon structured programming. • Learning C++ also teaches you an enhanced form of C. • Advanced computing topics (operating systems, etc) are typically and more efficiently implemented in C/C++. • Legacy migration of systems from C to C++ (30+ years of C code to migrate to C++ means jobs!). • Contrary to popular belief, it’s fun!

  14. Why object-oriented programming? • Object orientation • A natural way of thinking about the world and computer programs • Object-oriented design (OOD) • Models real-world objects in software • Models communication among objects • Encapsulates attributes and operations (behaviors) • Information hiding • Communication through well-defined interfaces • Object-oriented language • Programming in object oriented languages is called object-oriented programming (OOP) • C++ is an object-oriented language • Programmers can create user-defined types called classes • Contain data members (attributes) and member functions (behaviors) ECE 264: Lecture 1

  15. What are objects? • Reusable software components that model real world items • Meaningful software units • Time objects, paycheck objects, record objects, etc. • Any noun can be represented as an object • Objects have attributes • Size, shape, color, weight, etc. • Exhibit behaviors • Babies cry, crawl, sleep, etc.; cars accelerate, brake, turn, etc. • More understandable, better organized and easier to maintain than procedural programming • Libraries of reusable software • MFC (Microsoft Foundation Classes) ECE 264: Lecture 1

  16. Object-oriented design • Object-Oriented Analysis and Design (OOAD) • Analyze program requirements, then develop solution • Essential for large programs • Plan in pseudocode or UML • Unified Modeling Language (UML) • Graphical language that uses common notation • Allows developers to represent object-oriented designs ECE 264: Lecture 1

More Related