Lecture 1: Introduction to C++ Programming and Computer Science PDF

Summary

These are lecture notes for an introductory computer programming course, specifically focusing on C++. The course covers programming fundamentals, objectives, assessments, and provides an overview of computer hardware and software. It also explains why C++ is used for certain applications and tasks.

Full Transcript

Programming Fundamentals Course Teacher: Ms. Rabia Kamran Course Objective Understand basic problem solving steps and logic constructs Apply basic programing concepts Design and implement algorithms to solve real world problems Course Assessme...

Programming Fundamentals Course Teacher: Ms. Rabia Kamran Course Objective Understand basic problem solving steps and logic constructs Apply basic programing concepts Design and implement algorithms to solve real world problems Course Assessment Quizzes (5%) Assignment (5%) Attendance & Class Behaviour (5%) Presentation (5%) Mid Term Exams (30%) Final Term Exams (30%) Lab Practical (20%) Reference Material 1. 1. Starting Out with C++ from Control Structures to Objects, 9th Edition, Tony Gaddis 2. C++ How to Program, 10th Edition, Deitel & Deitel. 3. Object Oriented Programming in C++, 4th Edition by Robert Lafore 4. Starting out with Programming Logic & Degins, 4th Edition, Tony Gaddis, 5. The C Programming Language, 2nd Edition by Brian W. Kernighan, Dennis M. Ritchie 6. Problem Solving and Program Design in C++, 7th Edition by Jeri R. Hanly & Elliot B. Koffman Introduction to Computers and Programming Chapter 1, Book: Starting Out with C++, From Control Structures through Objects 9th Edition by Tony Gaddis Introduction The different ways that people use computers: In school, students use computers for tasks such as writing papers, searching for articles, sending email, and participating in online classes. At work, people use computers to analyze data, make presentations, conduct business transactions, communicate with customers and co-workers, control machines in manufacturing facilities, and do many other things. At home, people use computers for tasks such as paying bills, shopping online, communicating with friends and family, and playing games. And don’t forget that cell phones, tablets, smart phones, car navigation systems, and many other devices are computers too. The uses of computers are almost limitless in our everyday lives. Introduction Computers can perform such a wide variety of tasks because they can be programmed. This means that computers are not designed to do just one job, but to do any job that their programs tell them to do. A program is a set of instructions that a computer follows to perform a task. Programs are commonly referred to as software. Software is essential to a computer because it controls everything the computer does. All of the software that we use to make our computers useful is created by individuals working as programmers or software developers. A programmer, or software developer, is a person with the training and skills necessary to design, create, and test computer programs. Career in Computer Programming: Computer programming is an exciting and rewarding career. Today, you will find programmers’ work used in business, medicine, government, law enforcement, agriculture, academics, entertainment, and many other fields. Why C++? C++ is a general-purpose programming language. This language is around 40 years old and has been a part of many software problems and projects. C++ language is preferred to make high-performance software and is among the top programming languages. C++ is considered as a foundation language for many languages. It is one of the essential languages that you must know if you are interested in computer science. There are many different kinds of jobs out there that require C++ language. It is a versatile language, so it remains in high demand amongst professionals, such as software developers, game developers, C++ analysts and backend developers, etc. C++ is an advanced language that supports various programming methods like functional, procedural, and object-oriented programming. It is a fast language; its compile-time and execution time is faster than other programming languages. C++ programming language is very well suited for big projects. Many projects, including compilers, cloud storage systems, databases, game development, graphic designs, etc., are built using C++. C++ is also used for making 3D visuals projects, these projects require control over huge amounts of data efficiently, and C++ is one of the best choices for that. Why C++? Also, many applications and software that you use or go through in your daily lives are developed in C++. For example, Spotify, the popular music streaming application, has its backend code is written in C++. You all know Youtube, C++ is used in building YouTube video processing function. The Amazon application was also written in C++, however, there are changes over the years and more software like these are developed using C++. C++ programming language is almost everywhere around the world. For example, it is used for making browsers, applications, and software. Also, C++ is used majorly to make operating systems, and almost all operating systems are built using C++, for example, Mac Os, Windows, Linux, etc. Browsers like Safari, Opera, Chrome, Firefox, etc., are written in C++ because it is a fast and efficient language that is why it is preferable. C++ is also preferred for game development and complex business applications. C++ is an intermediate-level language; learning this language will give you a much deeper understanding of programming structure. In C++, you have to write, declare, and explain everything in the source code, giving you a deeper knowledge of all the program parts. Also, the syntax of C, C++, and Java are almost the same, so learning Java and C after C++ will be very easy. Why C++? Other languages like Python are much easier to understand because they are almost syntax-free. You don't have to specify everything while writing its code, which makes the programming part easy, but you don't get the opportunity to learn the logic structure of the program like C++. Once you have learned the C++ language, then other languages will be easy for you to learn, as your foundation becomes strong. An embedded system is a microprocessor-based software and hardware system that is used to design a specific function. Developing these embedded systems requires fast and efficient languages like C++. C++ is widely used in embedded systems because it is an intermediary language. It has both the features of the high-level and low-level language, which gives C++ an edge over other languages because it can directly access the hardware part without sacrificing the high-level part. Many embedded systems and gadgets like smartwatches, GPS systems, mp3 players, etc., are created using C++. C++ is versatile in nature and is a highly adaptable language. Due to high adaptability, it is still useful when it comes to software and developing games. Apart from Python, C++ is also used for simulations. Many simulations are created with the help of the C++ library, which is considered an alternative to the Python language. The object-oriented approach provides faster execution, full accessibility to the base language, portable models and executables, and complementary development tools. The simulation built with tools has the benefits of an object-oriented design, including encapsulation, polymorphism, inheritance, and parameterized typing. Computer Systems: Hardware and Software Section 1.2 Chapter 1 “Introduction to Computers and Programming”, Book: Starting Out with C++, From Control Structures through Objects, 9th Edition by Tony Gaddis Computer Systems: Hardware and Software CONCEPT: The physical devices of which a computer is made are referred to as the computer’s hardware. The programs that run on a computer are referred to as software. Hardware and Software Hardware: The term hardware refers to all of the physical devices, or components, of which a computer is made. A computer is not one single device, but a system of devices that all work together. A typical computer system consists of the following major components: Central Processing Unit (CPU): The central processing unit, or CPU, is the part of a computer that actually runs programs. Main Memory: (Computer’s work area) This is where the computer stores a program while the program is running, as well as the data that the program is working with. Also known as RAM (Random Access Memory). RAM is usually a volatile type of memory that is used only for temporary storage while a program is running. When the computer is turned off, the contents of RAM are erased. Secondary Storage Devices: Secondary storage is a type of memory that can hold data for long periods of time, even when there is no power to the computer. (HDD, SSD, USB/Flash drives/Memory sticks) Input Devices: Input is any data the computer collects from people and from other devices. The component that collects the data and sends it to the computer is called an input device. For example, keyboard, mouse, touchscreen, scanner, microphone, and digital camera. Output Devices: Output is any data the computer produces for people or for other devices. The data is sent to an output device, which formats and presents it. For example, video displays and printers. Hardware and Software Software: If a computer is to function, software is not optional. Everything computer does, from the time you turn the power switch on until you shut the system down, is under the control of software. There are two general categories of software: system software and application software. System Software: The programs that control and manage the basic operations of a computer are generally referred to as system software. System software typically includes the following types of programs: Operating Systems (Windows, macOS, and Linux, Android and iOS) Utility Programs (Virus scanners, file compression programs, data backup programs) Software Development Tools (Assemblers, Compilers, Interpreters) Application Software: Programs that make a computer useful for everyday tasks are known as application software. These are the programs that people normally spend most of their time running on their computers. For examples, Microsoft Word, a word processing program, and PowerPoint, a presentation program, spreadsheet programs, email programs, web browsers, and game programs.

Use Quizgecko on...
Browser
Browser