This document outlines the assessment structure for a 3 hour practical programming course with 1 hour of theory and no final exam. Students will be assessed entirely based on in-class assessments over the course topics. The course covers introductory programming concepts like definitions of programs, programmers, and programming languages. It also discusses programming fundamentals like algorithms, pseudocode, flowcharts and the implementation process.
This document provides an introduction to basic programming concepts including programs, programming, programming languages, and careers in programming.
A program is a series of organized instructions that directs a computer to perform tasks. Programming involves creating a set of commands that direct a computer. Programming languages allow humans to communicate with computers through words, symbols, and codes. There are many programming languages with different rules. Careers in programming include programmer, programmer analyst, computer scientist, and software engineer.
Dokumen ini memperkenalkan pengaturcaraan C dengan memberikan pengenalan ringkas tentang komputer, komponen-komponennya, jenis-jenis komputer dan perisian, bahasa pengaturcaraan serta bab-bab utama yang akan dipelajari seperti pengenalan C, operator, input output, struktur kawalan dan fungsi.
Dokumen tersebut membahas tentang adab bekerja. Adab bekerja merujuk pada tata cara dan etika yang tepat dalam melaksanakan pekerjaan agar berjalan lancar dan mendapat berkah dari Allah SWT. Adab-adab bekerja meliputi memulai pekerjaan dengan kalimah basmalah, menyelesaikan tugas tepat waktu, berpakaian rapi, toleransi terhadap rekan kerja, dan mematuhi aturan. Menjaga adab bekerja pent
This document provides an introduction to basic programming concepts including programs, programming, programming languages, and careers in programming.
A program is a series of organized instructions that directs a computer to perform tasks. Programming involves creating a set of commands that direct a computer. Programming languages allow humans to communicate with computers through words, symbols, and codes. There are many programming languages with different rules. Careers in programming include programmer, programmer analyst, computer scientist, and software engineer.
Dokumen ini memperkenalkan pengaturcaraan C dengan memberikan pengenalan ringkas tentang komputer, komponen-komponennya, jenis-jenis komputer dan perisian, bahasa pengaturcaraan serta bab-bab utama yang akan dipelajari seperti pengenalan C, operator, input output, struktur kawalan dan fungsi.
Dokumen tersebut membahas tentang adab bekerja. Adab bekerja merujuk pada tata cara dan etika yang tepat dalam melaksanakan pekerjaan agar berjalan lancar dan mendapat berkah dari Allah SWT. Adab-adab bekerja meliputi memulai pekerjaan dengan kalimah basmalah, menyelesaikan tugas tepat waktu, berpakaian rapi, toleransi terhadap rekan kerja, dan mematuhi aturan. Menjaga adab bekerja pent
Dokumen menjelaskan tentang algoritma, pseudokod dan carta alir. Algoritma adalah serangkaian langkah untuk menyelesaikan masalah, pseudokod menuliskan algoritma dalam bahasa biasa, dan carta alir menggambarkan algoritma secara grafik. Dokumen ini memberikan contoh algoritma, pseudokod dan carta alir untuk berbagai situasi, serta perbedaan antara aliran urutan dan pilihan tunggal.
Sistem operasi berfungsi untuk mengurus dan mengkoordinasikan sumber daya komputer seperti CPU, memori, penyimpanan, dan perangkat masukan/keluaran. Ia juga menyediakan antarmuka pengguna, mengatur tugas, mengurus berkas, dan menyediakan utilitas pendukung. Terdapat berbagai jenis sistem operasi untuk komputer meja, perangkat genggam, server, dan lainnya.
The document discusses techniques for creating effective PowerPoint presentations, including outlining content, storyboarding slides, navigation methods, using slide masters, adding graphics, tables, audio/video, and setting transitions and animations. It provides examples and encourages hands-on practice of features like inserting pictures, rotating objects, creating templates and hyperlinks, and setting timing for automatic or mouse click playback. The goal is to teach students how to design professional presentations using Microsoft PowerPoint.
1. Dokumen tersebut membahas tentang dua jenis bekalan elektrik, yaitu arus terus dan arus ulang alik.
2. Arus terus mempunyai magnitudo yang tetap sedangkan arus ulang alik magnitudonya berubah-ubah.
3. Dokumen tersebut juga menjelaskan konsep-konsep dasar seperti frekuensi, voltan puncak, voltan rms, dan cara mengukur parameter-parameter gelombang listrik.
Dokumen ini membahas tentang perkongsian sebagai salah satu bentuk kepemilikan perniagaan. Perkongsian adalah gabungan perniagaan oleh 2-20 orang yang setuju berkongsi modal, pengurusan, dan untung rugi. Ada tiga jenis rakan kongsi yaitu aktif, lelap, dan nominal. Rakan kongsi aktif terlibat langsung, rakan kongsi lelap hanya berkongsi modal, sedangkan rakan kongsi nominal hanya menyediakan nama
Dokumen tersebut membahas konsep ibadah dan jenis-jenis hukum dalam Islam. Ibadah didefinisikan sebagai perbuatan zahir atau batin yang disukai Allah SWT. Ada lima jenis hukum yakni wajib, haram, makruh, harus, dan sunat. Dokumen tersebut juga berisi latihan menentukan jenis hukum untuk beberapa situasi.
Dokumen ini memberikan pengenalan mengenai kabel koaksial (coaxial cable) yang digunakan untuk penyambungan antena TV, data komputer, CCTV, dan sistem satelit. Ia menjelaskan komponen utama kabel koaksial seperti inti tembaga, penebat dielektrik, perisai logam beranyam, dan jaket PVC serta jenis kabel koaksial yang umum digunakan seperti nipis dan tebal. Dokumen ini juga membincangkan ciri-ciri
Object oriented programming (OOP) provides more secure programs by hiding data. This document contains a 50-question multiple choice quiz on OOP concepts for a class. It tests knowledge of OOP principles like encapsulation, inheritance, polymorphism, abstraction. It also covers Java topics like classes, objects, methods, packages. The questions range from basic syntax and terminology to analyzing code snippets and designing programs based on scenarios.
Dokumen menjelaskan tentang algoritma, pseudokod dan carta alir. Algoritma adalah serangkaian langkah untuk menyelesaikan masalah, pseudokod menuliskan algoritma dalam bahasa biasa, dan carta alir menggambarkan algoritma secara grafik. Dokumen ini memberikan contoh algoritma, pseudokod dan carta alir untuk berbagai situasi, serta perbedaan antara aliran urutan dan pilihan tunggal.
Sistem operasi berfungsi untuk mengurus dan mengkoordinasikan sumber daya komputer seperti CPU, memori, penyimpanan, dan perangkat masukan/keluaran. Ia juga menyediakan antarmuka pengguna, mengatur tugas, mengurus berkas, dan menyediakan utilitas pendukung. Terdapat berbagai jenis sistem operasi untuk komputer meja, perangkat genggam, server, dan lainnya.
The document discusses techniques for creating effective PowerPoint presentations, including outlining content, storyboarding slides, navigation methods, using slide masters, adding graphics, tables, audio/video, and setting transitions and animations. It provides examples and encourages hands-on practice of features like inserting pictures, rotating objects, creating templates and hyperlinks, and setting timing for automatic or mouse click playback. The goal is to teach students how to design professional presentations using Microsoft PowerPoint.
1. Dokumen tersebut membahas tentang dua jenis bekalan elektrik, yaitu arus terus dan arus ulang alik.
2. Arus terus mempunyai magnitudo yang tetap sedangkan arus ulang alik magnitudonya berubah-ubah.
3. Dokumen tersebut juga menjelaskan konsep-konsep dasar seperti frekuensi, voltan puncak, voltan rms, dan cara mengukur parameter-parameter gelombang listrik.
Dokumen ini membahas tentang perkongsian sebagai salah satu bentuk kepemilikan perniagaan. Perkongsian adalah gabungan perniagaan oleh 2-20 orang yang setuju berkongsi modal, pengurusan, dan untung rugi. Ada tiga jenis rakan kongsi yaitu aktif, lelap, dan nominal. Rakan kongsi aktif terlibat langsung, rakan kongsi lelap hanya berkongsi modal, sedangkan rakan kongsi nominal hanya menyediakan nama
Dokumen tersebut membahas konsep ibadah dan jenis-jenis hukum dalam Islam. Ibadah didefinisikan sebagai perbuatan zahir atau batin yang disukai Allah SWT. Ada lima jenis hukum yakni wajib, haram, makruh, harus, dan sunat. Dokumen tersebut juga berisi latihan menentukan jenis hukum untuk beberapa situasi.
Dokumen ini memberikan pengenalan mengenai kabel koaksial (coaxial cable) yang digunakan untuk penyambungan antena TV, data komputer, CCTV, dan sistem satelit. Ia menjelaskan komponen utama kabel koaksial seperti inti tembaga, penebat dielektrik, perisai logam beranyam, dan jaket PVC serta jenis kabel koaksial yang umum digunakan seperti nipis dan tebal. Dokumen ini juga membincangkan ciri-ciri
Object oriented programming (OOP) provides more secure programs by hiding data. This document contains a 50-question multiple choice quiz on OOP concepts for a class. It tests knowledge of OOP principles like encapsulation, inheritance, polymorphism, abstraction. It also covers Java topics like classes, objects, methods, packages. The questions range from basic syntax and terminology to analyzing code snippets and designing programs based on scenarios.
Dokumen tersebut membincangkan tentang keselamatan komputer, termasuk definisi keselamatan komputer, ancaman terhadap keselamatan komputer seperti virus dan penggodaman, serta langkah-langkah keselamatan seperti penggunaan antivirus, enkripsi, dan tembok api.
Dokumen tersebut berisi soalan-soalan ujian BM Kertas 1 STPM tahun 2007 hingga 2009 beserta penjelasan proses menjawabnya. Terdapat beberapa subtopik seperti morfologi, fonologi, dan sintaksis. Diberikan pula pendekatan-pendekatan untuk menjawab soalan seperti pendekatan proses, pendekatan logika.
Dokumen tersebut merupakan draf kurikulum standard sekolah rendah (KSSR) Kementerian Pendidikan Malaysia. Ia membincangkan standard kandungan dan pembelajaran untuk modul pengaturcaraan yang meliputi pengenalan kepada pengaturcaraan komputer, kegunaan atur cara dalam perkakasan harian, dan penulisan set arahan untuk aktiviti dan peralatan digital. Dokumen ini juga menyenaraikan aktiviti pembelajaran untuk murid seperti permainan peranan dan tug
This document outlines the contents of an introductory programming course, divided into 9 units that cover topics such as problem solving, control structures, programming operators, the structure of C programs, selection structures like if/else statements, looping structures like for and while loops, functions, and arrays.
The document provides an introduction to programming fundamentals. It discusses [1] the hardware and software components of a computer system, [2] the steps of program execution involving input, processing, and output, and [3] the evolution of programming languages from low-level machine languages to high-level languages that more closely resemble human languages. It also covers [3] types of translators like assemblers, compilers, and interpreters that translate programming languages into machine-executable code.
This document discusses programming fundamentals and control structures. It covers sequential, selection, and looping control structures. For sequential structures, code is executed line by line from top to bottom. Selection structures like if/else statements allow code to be executed conditionally based on comparisons. The document provides examples of each type of structure and explains how to represent them using pseudocode and flowcharts. It also covers nested if statements, where conditions are dependent on the results of previous conditions. Overall, the document introduces different programming control structures and how they allow programs to control execution flow.
The document discusses the programming life cycle which consists of 6 steps: 1) problem analysis, 2) program design, 3) program coding, 4) testing and debugging, 5) maintenance, and 6) documentation. It provides details on each step, including techniques for problem analysis, various methods for program design like algorithms, flowcharts, and pseudocode, the coding process, testing procedures, maintenance activities, and contents of documentation.
Program latihan ini membahas pengaturcaraan komputer dan bagaimana atur cara digunakan untuk mengendalikan peralatan digital. Peserta akan belajar tentang bahasa pengaturcaraan, kegunaan atur cara dalam peralatan seharian, dan cara menulis atur cara untuk menyelesaikan masalah. Mereka juga akan membina atur cara untuk peralatan tertentu dan menambah fungsi baru pada atur cara yang ada.
For most programming/scripting languages the concepts are all the same. The only thing that changes is the syntax in which it is written. Some languages may be easier to remember than others, but if you follow the basic guide line, it will make learning any programming language easier. This is in no way supposed to teach you everything about programming, just a general knowledge so when you do program you will understand what you are doing a little bit better.
Kurikulum Standard Sekolah Menengah Sains Komputer memberi fokus kepada empat bidang utama iaitu pengkomputeran, pangkalan data, pengaturcaraan, dan interaksi antara manusia dan komputer untuk membangunkan kemahiran pemikiran komputasional dan kritikal murid. Dokumen ini menjelaskan matlamat, objektif, kerangka kurikulum, dan fokus kandungan kurikulum Sains Komputer.
The document provides an introduction to programming and problem solving using computers. It discusses the following key points:
- Problem solving involves determining the inputs, outputs, and steps to solve a problem. Computers can be programmed to solve problems more quickly if they involve extensive inputs/outputs or complex/time-consuming methods.
- The software development process includes requirements specification, analysis, design, implementation, testing, and documentation. Algorithms using pseudocode or flowcharts are designed to solve problems.
- Programming languages have evolved from low-level machine languages to high-level languages. Earlier generations like assembly language were more machine-oriented while modern languages are more portable, problem-oriented, and easier for humans to read and write
This lecture introduces programming fundamentals and Python. It discusses what programming is, the process of translating source code into machine-readable instructions, and program design using pseudocode and flowcharts. Program design tools like pseudocode and flowcharts allow programmers to plan programs' logic and structure before writing the actual code. The lecture also provides an overview of Python syntax and variables.
This document provides an overview of computer languages and the programming process. It discusses machine language as the lowest-level language understood by computers. Higher-level languages like assembly and programming languages make programming easier for humans. It also describes the programming process, which involves defining problems, planning solutions, coding, testing, and documenting programs. Finally, it discusses different types of program translators like assemblers, compilers, and interpreters that translate human-readable code into machine-readable code.
Computer programming involves writing instructions for a computer in a specific programming language. It is the process of creating computer software. There are many programming languages that are used for different purposes. Programming languages have evolved from low-level machine languages that are difficult for humans to read to high-level languages that are easier to use. High-level languages must be translated into machine code before a computer can execute them. Computer programs use logic, variables, and other programming elements to perform tasks. Programming provides benefits such as meeting demand for software and developing important job skills.
Computer programming involves writing instructions for a computer in a particular programming language. It is done by writing source code which is then translated by compilers, interpreters or assemblers into object code that computers can understand. There are many programming languages at different levels, with high-level languages being easier for humans but slower for computers compared to machine-level languages. Popular high-level languages include Java, Python and C++, which allow programmers to focus on solving problems without worrying about the specific computer hardware.
A Beginner’s Guide to Programming Logic, Introductory
Chapter 1
An Overview of Computers and
Programming
Objectives
In this chapter, you will learn about:
- Computer systems
- Simple program logic
- The steps involved in the program development cycle
- Pseudocode statements and flowchart symbols
- Using a sentinel value to end a program
- Programming and user environments
- The evolution of programming models
COURSE TECHNOLOGY
CENGAGE Learning
The document provides an overview of a compilers design and construction course. It discusses the various phases of compilation including lexical analysis, syntax analysis, semantic analysis, code generation, and optimization. The course aims to introduce the principles and techniques used in compiler construction and the issues that arise in developing a compiler. The course will cover topics like lexical analysis, syntax analysis, semantic analysis, intermediate code generation, control flow, code optimization and code generation over its 12 weeks.
This document provides an introduction to programming concepts such as algorithms, pseudocode, and flowcharts. It defines computer programming as the process of writing code to instruct a computer, and explains that programming languages allow users to communicate instructions to computers. The document outlines different types of computer languages including low-level languages like machine language and assembly language, and high-level languages like procedural, functional, and object-oriented languages. It also discusses specialized languages, translator programs, and program logic design tools for solving problems algorithmically through pseudocode and flowcharts.
Computer programming involves writing instructions for a computer in a programming language. It is done through programming languages that have specific syntax and keywords. There are low-level languages like machine code and assembly that are closer to what computers can understand directly, and high-level languages that are easier for humans like Python and Java but need to be compiled into machine code. Programs are made up of objects, variables, operations and control flow statements. Programming provides benefits like developing problem-solving skills and is a lucrative career.
This document discusses the fundamentals of programming and the program development life cycle. It defines key terms like program, programming, and programmer. It then outlines the six steps in the typical program development life cycle: 1) analyze the problem, 2) design the program, 3) code the program, 4) debug the program, 5) formalize the solution, and 6) maintain the program. Each step is described in one to three sentences.
1. The document outlines the key steps in the program development cycle including analyzing problems, designing algorithms, writing code, testing and debugging, documenting, and maintaining programs.
2. It also discusses important programming concepts like program execution, errors, tools for design like flowcharts and pseudocode, and common uses of computer programs.
3. The example of a stamps program is used to illustrate developing an algorithm, writing pseudocode, and creating a flowchart to design a program before writing the actual code.
This document discusses programming and the program development process. It defines programming as giving a computer instructions to accomplish a task. The typical development process involves two phases: problem solving to design an algorithm of steps to solve the problem, and implementation to code the algorithm into a programming language. The key steps of program development are: 1) analyzing the problem, 2) designing the algorithm, 3) checking the algorithm, 4) coding it into a program, 5) testing the program, and 6) documenting and maintaining the program. Popular programming languages include C++, Visual Basic, C#, Java, and Python.
This document provides an introduction to programming languages and Python. It discusses what a program is, different categories of software, and types of programming languages including machine language, assembly language, and high-level languages. It also covers programming paradigms like imperative, logical, functional, and object-oriented. The document outlines the software development life cycle and describes key areas where Python is commonly used like academia, scientific tools, machine learning, and web development.
The document discusses compilers and their role in translating high-level programming languages into machine-readable code. It notes that compilers perform several key functions: lexical analysis, syntax analysis, generation of an intermediate representation, optimization of the intermediate code, and finally generation of assembly or machine code. The compiler allows programmers to write code in a high-level language that is easier for humans while still producing efficient low-level code that computers can execute.
This chapter introduces computer systems and programming, covering hardware, software, programming languages, and the program development cycle. It describes using pseudocode and flowcharts to plan program logic before coding. Testing and debugging programs is discussed, as well as different programming environments and models that have evolved over time. The key steps in programming are understanding the problem, planning the logic, coding, testing, and maintaining programs.
This document outlines the course content for Principles and Techniques of Programming I. The course is divided into two parts: Programming Principles and Programming Techniques in Python. Programming Principles covers programming concepts, styles, and Chapter 1 discusses programming, languages, paradigms, and application domains. Techniques in Python covers Python's programming environment, control structures, arrays/lists, and modular programming. The document provides details on chapter topics, definitions, and examples.
This document provides an overview of computers and programming languages. It discusses the evolution of computers from mainframes to personal computers. It also examines the hardware and software components of a computer system, including the CPU, memory, storage, inputs, outputs, and operating system software. The document then explores the evolution of programming languages from machine language to assembly language to high-level languages. It describes how a high-level language program is compiled and executed. Finally, it discusses problem-solving techniques, structured programming, and object-oriented programming.
The document provides an overview of problem solving and C programming at a basic knowledge level. It covers various topics including introduction to problem solving, programming languages, introduction to C programming, selection structures, arrays and strings, pointers, functions, structures and unions, and files. The objective is to understand problem solving concepts, appreciate program design, understand C programming elements, and write effective C programs. It discusses steps in program development, algorithms, modular design, coding, documentation, compilation and more.
DISCLAIMER: This Presentation is made for educational purposes only.
Introduction to Computer Programming, Computer Language, History of Computer Language, Hierarchy of High-Level Languages, Algorithm, Data Types and Arduino
This document provides an overview of the sections and question types found in the English UPSR Paper One exam. It is divided into 5 sections (A-E) worth 40% of the total exam marks. Section A contains word, phrase, and sentence level questions. Section B contains questions about appropriate responses to language functions. Section C focuses on grammar questions. Section D involves filling in blanks of short texts. Section E requires answering comprehension questions about one or more passages. The document provides examples and advice for successfully answering each question type.
The document contains examples of different content layouts including a title with picture layout, content layouts with lists, charts, tables, SmartArt diagrams, and a picture with caption. It demonstrates how to structure content using various visual elements like bullet points, categories, groups, steps, and a caption to effectively convey information through formatting and organization.
This document outlines a 28-hour fundamental programming summary lecture that introduces programming concepts, C fundamentals, data input/output, control statements, functions, and arrays. Students will be assessed through a practical lab, assignment, and final test worth 50%, 20%, and 30% respectively, for a total of 100% of their marks.
This document discusses linear time-invariant (LTI) systems and convolution. It begins by defining LTI systems and convolution for both continuous and discrete time. Convolution is described as a way to construct the output of a system given its impulse response. Applications in digital signal processing and image processing are mentioned. Convolution filtering plays an important role in edge detection and related image processing algorithms. The mathematical definition of discrete time convolution is provided. An example problem calculating outputs for different inputs using convolution is given at the end.
This document discusses linear time-invariant (LTI) systems and convolution. Convolution is a fundamental concept in signal processing that is used to determine the output of an LTI system given its impulse response and an input signal. The convolution of two signals is obtained by decomposing the input signal into scaled and shifted impulses, taking the scaled and shifted impulse response for each impulse, and summing them to find the overall output. Convolution amplifies or attenuates different frequency components of the input independently. It plays an important role in applications like image processing and edge detection. Examples are provided to demonstrate evaluating convolution of periodic sequences.
Dokumen tersebut memberikan panduan langkah-langkah untuk menulis program C dan mendapatkan output, diikuti dengan contoh program C sederhana untuk menampilkan pesan sambutan dan ucapan selamat. Dokumen tersebut juga menjelaskan fungsi-fungsi dasar dalam bahasa C seperti printf, return, dan kurung kurawal {} untuk menandai blok kode.
This document provides an overview of signals and systems. It defines key terms like signal, system, continuous and discrete time signals, analog and digital signals, periodic and aperiodic signals. It also discusses different types of signals like deterministic and probabilistic signals, energy and power signals. The document then classifies systems as linear/nonlinear, time-invariant/variant, causal/non-causal, and with/without memory. It provides examples of different signals and properties of signals like magnitude scaling, time shifting, reflection and scaling. Overall, the document introduces fundamental concepts in signals and systems.
This document provides instructions for an assignment on signals and systems. Students are asked to submit their work on Chapter 1 exercises determining whether various signals are periodic or aperiodic, and identifying the fundamental period of any periodic signals. The assignment is due next week.
Tripping and control of impulse generatorsFariza Zahari
The document discusses methods for tripping and controlling impulse generators. A simple method uses a three electrode gap in the first stage, where the central electrode is maintained at a potential between the top and bottom electrodes. Tripping is initiated by applying a pulse to a thyraton, which produces a negative pulse to trigger the three electrode gap. Modern methods instead use a trigatron, which requires a smaller voltage for operation. A trigatron consists of a high voltage sphere, earthed main sphere, and trigger electrode. Tripping is achieved by a pulse causing a spark between the trigger electrode and earthed sphere, inducing a spark across the main gap.
2. Topic 1 : Introductory Concepts
Defination
a.
Programme - a program is a specific set of ordered operations for a
computer to perform
a.
Programmer - a person who writes a program so that data may be
processed by a computer
- person who designs and writes and tests computer programs
- who prepares or writes instructional programs for a computer
c.
Proggramming language- A programming language is an artificial
language designed to express computations that can be performed
by a machine, particularly a computer. Programming languages can
be used to create programme that control the behavior of a machine,
to express algorithms precisely, or as a mode of human
communication
-is a language designed to describe a set of consecutive actions to
be executed by a computer. A programming language is therefore a
practical way for us (humans) to give instructions to a computer.
3. PROGRAMME
• A computer programme (also a software
programme, or just a program) is a sequence
of instructions written to perform a specified
task for a computer.[1] A computer requires
programs to function, typically executing the
program's instructions in a central
processor.[2] The program has an executable
form that the computer can use directly to
execute the instructions.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
4. PROGRAMMER
• A programmer, computer programmer or
coder is someone who writes computer
software. The term computer programmer
can refer to a specialist in one area of
computer programming or to a generalist
who writes code for many kinds of
software(C, C++, Java, Lisp, Delphi).
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL PROGRAMMING
5. ARAS BAHASA PENGATURCARAAN KOMPUTER
COMPUTER PROGRAMMING LANGUAGE LEVEL
TERBAHAGI KEPADA 4
JENIS
•
•
•
•
BAHASA MESIN
BAHASA HIMPUNAN
BAHASA ARAS TINGGI
BAHASA
PENGATURCARAAN
PEMBANGUNAN
APLIKASI PANTAS
DIVIDED IN TO 4 TYPES:
• MACHINE LANGUAGE
• ASSEMBLY LANGUAGE
• HIGH LEVEL
LANGUAGE
• RAPID APLICATION
DEVELOPER (RAD)
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
6. Brief explaination
Machine Language
•
•
•
Use own machine language
Assemble binary numbers (1,0)
No need translator
Assembly Language
•
Easy language similar to human
language
Use short English wording
Translator for this language called
compiler
•
•
High Level language
•
•
Shorts codes used to settle multiple task
Faster and easier to learn and write
programming
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
7. •
•
•
•
•
Pascal, Basic, Cobol, Fortran, Ada, C, C++, JAVA
Used GUI – Graphical User Interface
Control window colour, size with simple and user
friendly interfaces
Interesting Programming Language with great
visualization.
Examples: Visual basic, Delphi, C++ Builder
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
9. Compare between the
following types of
programming
STRUCTURED
MODULAR
OBJECT-ORIENTED
Subset of procedural
programming that
enforces a logical
structure on the
program being written
to make it more
efficient and easier to
understand and modify.
Breaking down the
design of a program
into individual
components (modules)
that can be
programmed and
tested independently. It
is a requirement for
effective development
and maintenance of
large programs and
projects.
Programming language
model organized
around "objects" rather
than "actions" and data
rather than logic.
Historically, a program
has been viewed as a
logical procedure that
takes input data,
processes it, and
produces output data.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
10. A Brief of History of C
• C was created by Dennis
Ritchie at Bell Telephone
Laboratories in 1972.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL PROGRAMMING
11. PERKAKASAN KOMPUTER
Komponen asas:
1) Peranti input
2) Peranti output
3) Unit pemprosesan pusat ( CPU )
4) Ingatan utama ( RAM dan ROM )
5) Ingatan bantu ( floppy A, cekera bermagnet )
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL PROGRAMMING
14. TYPES OF ERROR IN PROGRAMMING
1) SYNTAX ERROR
A collection of the rules for writing programs in a
programming language is know as syntax. All
program statements are written according do these
rules.
Syntax error is a type of error that occurs when a
invalid statement is written in program.
The compiler detects syntax errors and display
error massage to describe the cause of error. A
program containing syntax errors can`t be compiled
successfully.
15. EXAMPLES:
• The statement terminator is missing at
the end of statement like coma,
semicolon ( ); etc.
• A misspelled keyword is used in the
program.
• Any of the delimiters is missing.
• Example: Typing "forr" insted of "for" is
an example of syntax error.
18. 2. Run-time errors
•
•
•
•
An attempt to perform an invalid operation,
detected during program execution.
Occurs when the program directs the computer
to perform an illegal operation, such as dividing
a number by zero.
The computer will executing the program, but
no output display.
And message box appears indicates the line
where the error was detected
18
19.
20. 3. Logic Error/Design Error
• An error caused by following an incorrect
algorithm
• Very difficult to detect - it does not cause runtime error and does not display message errors.
• The only sign of logic error – incorrect program
output
• Can be detected by testing the program
thoroughly, comparing its output to calculated
results
• To prevent – carefully desk checking the
algorithm and written program before you
actually type it
CSEB134 : BS/2008
20
21.
22. 6 STAGE PROBLEM SOLVING
(process of designing program)
1.
2.
3.
4.
5.
6.
Defining and analyzing problems
Planning of variables
Drawing of flowchart
Program writing
Testing and debugging program
Documentation of program
Process of designing program can be divided
into two phases
1. problem solving phase (1 through 3)
2. implementation phase (4 and 5)
While in step 6, documentation is done throughout the
process of designing program
23. Defining and analyzing
problems
What is the problem?
• Problem is an unsolved
task that need to be settle
with smart consideration
• Perkara yang
belum
diselesaikan
yang
memerlukan
penyelesaian
dari
pertimbangan
atau
kemahiran fikiran
Penyelesaian
• Proses
menyelesaikan
masalah yang melibatkan
satu jujukan set tatacara
yang
perlu
dilakukan
mengikut susunan logik
yang
betul.
Ia
menggunakan
pengetahuan bergantung
kepada
keupayaan
memilih,
menggunakan
strategi, teknik dan alatan
yang sesuai.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
24. Defining and analyzing problems
• Langkah-langkah dalam pengaturcaraan :
– Definisi dan kenalpasti masalah
- Kenalpasti dan fahami masalah yang hendak diselesaikan
i. Baca soalan dan kenalpasti serta fahami kehendak
soalan
ii. Buat analisa terhadap masalah dengan tentukan 3
perkara utama :
* INPUT yang diperlukan
* OUTPUT yang dikeluarkan
* PROSES
tentukan formula untuk dapatkan
output dari input yang diberi
INPUT
PROSES
(aturcara)
OUTPUT
25. Contoh Masalah
Dahaga dan
ingin minum
teh
tarik
buatan
sendiri
•
•
•
•
Apa yang perlu dilakukan?
Masak air.. Berapa banyak?
Berapa orang nak minum?
Pekat atau tidak??..berapa
uncang teh?
• Manis atau kurang manis?..berapa
susu gula??
• Minum dalam mug atau cawan?
• Sejuk atau panas?..
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
26. Contoh Penyelesaian..
The Tarik buatan sendiri
1. Kira berapa orang.
• 1 Org minum 1 mug =
400ml
• Air = Orang x 400ml
2. 2 orang perlu1 uncang
• Uncang = orang /2
3. 1 uncang perlu 5 sudu
susu pekat
Susu = uncang x 5
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
27. Defining and analyzing problems
• Langkah-langkah dalam pengaturcaraan :
– Merancang pembolehubah
- Pembolehubah ialah rujukan kepada lokasi memori
- Pembolehubah dengan jenis data yang khusus
menentukan saiz memori yang diperuntukan
- Semua pembolehubah mesti diishtiharkan sebelum
digunakan dalam aturcara
28. Aturcara Berstruktur
•
Langkah-langkah dalam pengaturcaraan :
– Rekabentuk aturcara
- Lebih dikenali sebagai proses merekabentuk algoritma
- Algoritma
senarai langkah-langkah untuk selesaikan
masalah
- Dibuat sebelum pengkodan aturcara sebenar untuk
pastikan kaedah penyelesaian masalah yang digunakan
adalah betul
- Terdapat 2 cara menulis algoritma :
i. Kod pseudo
Langkah-langkah penyelesaian masalah yang ditulis guna
bahasa percakapan seharian
ii. Carta alir
Langkah-langkah penyelesaian masalah guna rajah-rajah
tertentu
29. Algorithms
• Computing problems
– All can be solved by executing a series of actions
in a specific order
• Algorithm: procedure in terms of
– Actions to be executed
– The order in which these actions are to be
executed
• Program control
– Specify order in which statements are to be
executed
31. Contoh Algoritma
Tentukan sama ada suatu nombor itu nombor genap atau ganjil
Input: Suatu nombor bulat
Output: Mesej “no genap” atan “no ganjil”
Kira purata markah bagi kursus Pengaturcaraan C
Input:
i. Markah setiap pelajar
ii. Bilangan Pelajar
Output: Purata Markah
Kira dan paparkan harga epal jika diberi kuantiti epal yang dibeli
dalam kilogram dan harga sekilogram
Input:
i. Kuantiti epal yang dibeli dalam kilogram
ii. Harga epalJAWAPANkilogram )
( ringgit /
Output: Harga epal ( dalam ringgit )
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
32. Pseudocode
• Pseudocode
– Artificial, informal language that helps us
develop algorithms
– Similar to everyday English
– Not actually executed on computers
– Helps us “think out” a program before
writing it
• Easy to convert into a corresponding C++
program
• Consists only of executable statements
32
33. Pseudokod
Senarai langkah-langkah untuk selesaikan
masalah
Contoh : Menukar mentol yang terbakar
mula
Mengeluarkan mentol yang terbakar
Gantikan dengan mentol baru
tamat
Adakah ia mencukupi untuk perlaksanaan komputer ?
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
34. • Kod pseudo
Contoh : Menukar mentol yang terbakar (terperinci)
mula
Letak tangga di posisi mentol terbakar
Pilih mentol yang sesuai
Naik tangga sehingga mencapai mentol yang terbakar
Pusing mentol ikut arah lawan jam dan keluarkan mentol
Muatkan mentol baru ditempat sepatutnya
Pusingkan mentol ikut arah jam
Turun tangga
Letakkan kembali tangga
tamat
35. SIMBOL-SIMBOL CARTA ALIR
SIMBOL GRAFIK
MAKSUD
MULA / TAMAT
PROSES
INPUT / OUTPUT
SYARAT
ALIRAN KAWALAN
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
36. Carta Alir
Mula
Dapatkan x,y
Jumlah = x + y
Purata = (x+y)/2
Darab = x*y
Cetak jumlah,
purata dan darab
Tamat
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
37. Pseudokod
• Masalah menentukan taraf lulus keputusan
peperiksaan pelajar.
•
•
•
•
•
•
Mula
Dapatkan mata gred pelajar
Tentukan samada pelajar lulus
Jika matagred >=2.0
JAWAPAN
laporkan ‘lulus’
Tamat
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
40. Perlaksanaan
• Proses menukarkan algoritma kepada
bahasa pengaturcaraan.
• Aturcara komputer ialah satu jujukan
kenyataan menggunakan bahasa C++ untuk
menyelesaikan sesuatu masalah.
• Pengkompil akan menterjemahkan aturcara
kepada bentuk yang boleh difahami oleh
komputer
• Pengkompil akan memaparkan ralat yang
terkandung dalam aturcara.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING
41. Perlaksanaan
• Langkah-langkah dalam pengaturcaraan :
– Menguji & menyahsilap aturcara
- Aturcara yang telah siap dibina perlu
diuji/dijalankan (run) untuk memastikan hasil
output yang dikeluarkan adalah betul dan
memenuhi kehendak pengguna
- Menyahsilap (debugging)
aturcara diuji
dengan data-data yang sebenar
- Ada kemungkinan output yang silap (ralat)
mungkin terhasil daripada aturcara yang ditulis
42. Perlaksanaan
• Jenis ralat dalam pengaturcaraan
• Ralat rekabentuk/ Ralat Logik
– Terjadi semasa proses rekabentuk aturcara
– Berpunca dari cara atau langkah penyelesaian
masalah yang tidak betul
• Ralat sintaks
– Ralat yang dikesan dan mudah dibetulkan
– Melibatkan kesilapan dalam menulis aturcara,
seperti tertinggal simbol dsbnya.
• Ralat masa jalanan(RUN-TIME ERROR)
– Berpunca dari kemasukan data tidak mengikut arahan yang ditulis
dalam aturcara cth: data jenis int tetapi data yang dimasuk jenis
char
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL PROGRAMMING
43. Pengujian dan Pengesahihan
• Uji dan sahkan keluaran yang dikehendaki
benar
• Proses untuk memastikan aturcara yang
dibangunkan memenuhi keperluan
pengguna
styled by: FARIZA ZAHARI.EC201
FUNDAMENTAL
PROGRAMMING
44. Pendokumenan
• Menyimpan semua data aturcara
• Menyimpan aturcara yang ditulis
• Menyimpan semua komponen yang
terlibat dalam membangunkan dan
menjalankan aturcara.
• Melibatkan spesifikasi, penerangan
tentang masalah, rumusan, pseudokod
atau carta alir, dsbnya.
styled by: FARIZA ZAHARI.EC201 FUNDAMENTAL
PROGRAMMING