+ All Categories
Home > Business > Programming 1 [compatibility mode]mm

Programming 1 [compatibility mode]mm

Date post: 02-Jul-2015
Category:
Upload: annisa-sabrina-batrisyia
View: 33 times
Download: 0 times
Share this document with a friend
Description:
moooooo
23
Introduction to Programming Language
Transcript
Page 1: Programming 1 [compatibility mode]mm

Introduction to Programming Language

Page 2: Programming 1 [compatibility mode]mm

Outline Course Introduction to Computer Organization Introduction to Programming Language Programming Phase Introduction to Java Programming Object Oriented Programming Concept

Page 3: Programming 1 [compatibility mode]mm

Lecturer Dr. Muhammad Niswar Education

Bachelor: UNHAS, 1997 Master: Univ. of Newcastle, NSW, 2001 Doctor: Nara Institute of Science & Technology, JAPAN, 2010

Research Interest Wireless/Mobile Networking, Wireless Sensor Network Mobile Application Development Embedded System Cloud Computing Network Management & Operation

http://iplab.naist.jp/member/niswar/ Email: niswar”at”unhas.ac.id

Page 4: Programming 1 [compatibility mode]mm

References Java Education & Development Initiatives (JEDI) Java Programming

Page 5: Programming 1 [compatibility mode]mm

Assessment IDE Installation & usage (10%)

NetBeans Eclipse

Programming Assignment (30%) Practical Exam (60%)

Page 6: Programming 1 [compatibility mode]mm

6

What Is a Computer? Computer Performs computations and makes logical decisions Millions / billions times faster than human beings

Computer programs Sets of instructions by which a computer processes data

Hardware Physical devices of computer system

Software Programs that run on computers

Page 7: Programming 1 [compatibility mode]mm

7

Computer Organization Six logical units of computer system Input unit Mouse, keyboard

Output unit Printer, monitor, audio speakers

Memory unit Retains input and processed information

Arithmetic and logic unit (ALU) Performs calculations

Central processing unit (CPU) Supervises operation of other devices

Secondary storage unit Hard drives, floppy drives

Page 8: Programming 1 [compatibility mode]mm

8

Evolution of Operating Systems Batch processing One job (task) at a time Operating systems developed Programs to make computers more convenient to use Switch jobs easier

Multiprogramming “Simultaneous” jobs Timesharing operating systems

2003 Prentice Hall, Inc. All rights reserved.

Page 9: Programming 1 [compatibility mode]mm

The boot process The process by which a machine comes up from rest

state to the state that is usable is known as booting When the power is turned on The CPU runs the BIOS (Basic Input / Output System) Usually located on a chip on the motherboard Runs POST (Power On Self Test) of various hardware components Loads the boot sector program

9

Page 10: Programming 1 [compatibility mode]mm

The boot process (continued) Boot Sector Program Located in the first sector of the hard disk or other disk Is responsible for loading the rest of the operation system into the RAM

Operating System Once it is loaded, it configures the various hardware components Then it waits for the user to issue commands Then you can run your applications

10

Page 11: Programming 1 [compatibility mode]mm

Introduction to Programming Language Programming Language use to create/develop a program

application or other set of instructions to control the behavior of a machine.

Example: C/C++ Java Pascal Cobol

Page 12: Programming 1 [compatibility mode]mm

Programming Language Classification High Level

Core (compiled): Java, C++, Pascal, Fortran, Basic Script (non-compiled): bash,tcsh,perl,python,ruby,..etc

Middle Level C

Low Level Assembly

Page 13: Programming 1 [compatibility mode]mm

Programming Language Classification

Page 14: Programming 1 [compatibility mode]mm

Computer

H/WOS/KernelShellApplication

Page 15: Programming 1 [compatibility mode]mm

Programming Phase Problem Definition Problem Analysis Algorithm Design Coding & Debugging

Page 16: Programming 1 [compatibility mode]mm

Problem Definition Problem must be well & clearly defined Clearly defined problem = ½ solution Example:

– “Create a program that will determine the number of times a name occurs in a list”

Page 17: Programming 1 [compatibility mode]mm

Problem Analysis Solution of the problem must be formulated Example Problem:

“Create a program that will determine the number of times a name occurs in a list”

Input to the program– List of names, name to look for

Output to the program– The number of times the name occurs in a list

Page 18: Programming 1 [compatibility mode]mm

Algorithm Design Express our solution to step-by-step manner The way of Express:

– Human Language– Flow chart– Pseudocode

Page 19: Programming 1 [compatibility mode]mm

Algorithm Design- Human Language -

Get the list name of names Get the name to look for, let's call this the keyname Compare the keyname to each of the names in the list If the keyname is the same with a name in the list, add 1 to the

count If all the names have been compared, output the result.

Page 20: Programming 1 [compatibility mode]mm

Algorithm Design- Pseudocode -

Let nameList = List of Names Let keyName = the name to be soughtLet Count = 0For each name in NameList do the followingIf name == keyNameCount = Count + 1Display Count

Page 21: Programming 1 [compatibility mode]mm

Algorithm Design- Flowchart -

Start

GetNameList

GetKeyName

Count = 0

More Names ? Name = KeyName?

Count = Count + 1

A

A

DisplayCount

Stop

No

Yes

Yes

Page 22: Programming 1 [compatibility mode]mm

Coding & Debugging Coding:

– Create a source code based on Algorithm

Debugging:– Fixed the error found in source code

Compile-Time Error– If there is a syntax error

Page 23: Programming 1 [compatibility mode]mm

ExerciseWriting an algorithm

Cooking an Instant Noodle Getting the average of three numbers


Recommended