CS 117 Section 2 + KNET Computer accounts –Emailed to KNET students –Change password Homework 1 Lab Tutors –In lab for next 2 weeks –Will help you with.

Slides:



Advertisements
Similar presentations
This Time Whitespace and Input/Output revisited The Programming cycle Boolean Operators The “if” control structure LAB –Write a program that takes an integer.
Advertisements

Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
CMPUT 101 Lab # 5 October 22, :00 – 17:00.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Problem Solving and Program Design. COMP104 Problem Solving / Slide 2 Our First Program // a simple program #include using namespace std; int main() {
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
Three types of computer languages
1 9/1/06CS150 Introduction to Computer Science 1 What Data Do We Have? CS 150 Introduction to Computer Science I.
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
1 September 6, 2005CS150 Introduction to Computer Science I What Actions Do We Have Part 1 CS150 Introduction to Computer Science I.
Computer Science 1620 Programming & Problem Solving.
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
CS 202 Computer Science II Lab Fall 2009 September 3.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
Chapter 7. 2 Objectives You should be able to describe: The string Class Character Manipulation Methods Exception Handling Input Data Validation Namespaces.
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
C++ Basics CSci 107. A C++ program //include headers; these are modules that include functions that you may use in your //program; we will almost always.
Programming is instructing a computer to perform a task for you with the help of a programming language.
Software Engineering 1 (Chap. 1) Object-Centered Design.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Agenda What is Computer Programming? The Programming Process
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Problem Solving Methods. CSCE 1062 Outline Problem Solving Methods Problem solving steps The analytical method The algorithmic method The software engineering.
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Computer Engineering 1 nd Semester Dr. Rabie A. Ramadan 2.
Creating your first C++ program
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
1 Problem Solving with C++ The Object of Programming Walter Savitch Chapter 1 Introduction to Computers and C++ Programming Slides by David B. Teague,
CHAPTER 7 DATA INPUT OUTPUT Prepared by: Lec. Ghader R. Kurdi.
C++ Coding and Compiling. Why QT/C++ Over Java?  Java is easier than C++  Java has built in GUIs  Java is multi-platform  C/C++ is more used in industry.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 2.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 05, 2005 Lecture Number: 4.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
CHAPTER 2 PART #3 C++ INPUT / OUTPUT 1 st Semester King Saud University College of Applied studies and Community Service CSC1101 By: Fatimah.
Learners Support Publications Introduction to C++
Dayu Zhang 9/10/2014 Lab03. Outline Brief Review of the 4 Steps in Hello.cpp Example Understand endl and \n Understand Comment Programming Exercise -
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
 Simple UNIX commands  I/O techniques in C++  Solutions to Lab#0 problems  Solutions to Lab#1 problems 1.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Software Engineering Algorithms, Compilers, & Lifecycle.
First Day in Lab Making a C++ program
Basic concepts of C++ Presented by Prof. Satyajit De
What Actions Do We Have Part 1
Microsoft Imagine All KU students currently enrolled in a CS class are eligible to receive Microsoft software, including Operating Systems development.
Completing the Problem-Solving Process
CS-103 COMPUTER PROGRAMMING
Chapter 2 Assignment and Interactive Input
Computer Engineering 1nd Semester
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
CS150 Introduction to Computer Science 1
COMS 261 Computer Science I
C++ Basics CSci 107. A C++ program //include headers; these are modules that include functions that you may use in your //program; we will almost always.
Chapter 1 c++ structure C++ Input / Output
Presentation transcript:

CS 117 Section 2 + KNET Computer accounts – ed to KNET students –Change password Homework 1 Lab Tutors –In lab for next 2 weeks –Will help you with Linux, vi, subscription

Basic Programming What does a C++ program look like How do you use your computer account

Linux Use your user name and password to log into emerald Use passwd command to change your password

4 Processing a Program t Editor used to enter the program –Source program (file.cpp) –UNIX vi text editor t Compiler translates the source program –Displays syntax errors (not descriptive) t Linker/Loader to combine object file with other object files –Executable program

5 Processing a Program t Major activities –Editing - vi or other text editor vi hello.cpp –Compiling/Linking - one step with g++ on emerald g++ hello.cpp g++ -o hello hello.cpp –Running - type the executable name a.out hello

shell.cpp /* shell.cpp */ #include int main( void) { cout << "The first line of text" << endl; return 0; }

input and output I/O in C++ uses streams cout << "some text" << endl; cin >> someVar;

Program output cout is standard output stream –monitor << is an operator that inserts data into an output stream –outStream << data Text in double quotes is a constant string –“Hello, World!”

Program input cin is standard input stream –keyboard >> is an operator that extracts data from an input stream –inStream >> variable

Software Development Method t Problem Analysis - (Correct Problem) –Identify data objects –Goal to model properties –Determine Input / Output data –Constraints on the problem t Design –Decompose into smaller problems –Top-down design (divide and conquer) –Develop Algorithm (Desk check)

11 Software Development Method t Implementation –Writing the algorithm t Testing –Verify the program meets requirements –System and Unit test t Documentation –Key part in the development process

12 Software Development Method t Software engineering –Area of computer science concerned with building large software systems t Challenge –Tremendous advances in hardware have not been accompanied by comparable advances in software