CS 117 Section 2 KNET - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

CS 117 Section 2 KNET

Description:

Use your user name and password to log into emerald. Use passwd command to change your password ... one step with g on emerald. g hello.cpp. g -o hello ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 13
Provided by: michae1318
Category:
Tags: knet | emerald | section

less

Transcript and Presenter's Notes

Title: CS 117 Section 2 KNET


1
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 Linux, vi, email subscription

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

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

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

5
Processing a Program
  • 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

6
shell.cpp
  • / shell.cpp /
  • include ltiostreamgt
  • int main( void)
  • cout ltlt "The first line of text"
  • ltlt endl
  • return 0

7
input and output
  • I/O in C uses streams
  • cout ltlt "some text" ltlt endl
  • cin gtgt someVar

8
Program output
  • cout is standard output stream
  • monitor
  • ltlt is an operator that inserts data into an
    output stream
  • outStream ltlt data
  • Text in double quotes is a constant string
  • Hello, World!

9
Program input
  • cin is standard input stream
  • keyboard
  • gtgt is an operator that extracts data from an
    input stream
  • inStream gtgt variable

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

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

12
Software Development Method
  • Software engineering
  • Area of computer science concerned with building
    large software systems
  • Challenge
  • Tremendous advances in hardware have not been
    accompanied by comparable advances in software
Write a Comment
User Comments (0)
About PowerShow.com