🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Computer Programming.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

⮛ BASICS OF PROGRAMMING A computer program is a sequential set of instructions, known as codes, written or “programmed” in a computer language to let computer perform a specific computation task. Ex. System software, web browsers, utility software, multimedia software and spreadsheet software. A co...

⮛ BASICS OF PROGRAMMING A computer program is a sequential set of instructions, known as codes, written or “programmed” in a computer language to let computer perform a specific computation task. Ex. System software, web browsers, utility software, multimedia software and spreadsheet software. A computer language is a set of grammatical rules that commands a computer or a device to behave in a specific way. It also refers to programming language. PROGRAMMING Enhance critical thinking, logical reasoning, and problem- solving abilities that help programmers break down complex tasks into manageable steps and develop efocient algorithms. It is the art and science of instructing computers to perform task using a specific programming language. It creates codes that tell computer how to solve problems and accomplish various operations. By writing code in programming languages, programmers can develop computer program or software applications, design websites, analyze data, and automate process, among other operations. EVOLUTION AND HISTORY OF PROGRAMMING Programming involved writing machine code initially. This consisted of binary instructions (0 and 1) directly communicating with the computer’s hardware. As technology progressed, high-level programming languages allowed programmers to write code using more human-readable syntax. PROGRAMMING PARADIGMS the term “paradigm” is synonymous with “pattern” These refer to the different approaches to structing and organizing code. ▪ Procedural Programming – or imperative programming, focuses on organizing code into reusable procedures or functions ▪ Objective-oriented Programming (OOP) – encapsulate data and behavior that promotes modularity, code reusability, and scalability. ▪ Functional Programming – treats computation as evaluating mathematical functions, emphasizing consistency, and avoiding side effects. PRORAMMING LANGUAGE a set of grammatical rules that commands to a computer to behave in a specific way. two (2) class of language Low-level Language Machine code and hardware in terms of syntax. Example of this language: Assembly Language use for specific instructions to control computer’s hardware. Machine Language all instructions are written as binary numbers (1 and 10). High-level Language easy for humans to read, write, and understand. OTHER PROGRAMMING TERMINOLOGIES Syntax set of rules defining the various combinations and arrangement of symbols Command unique instructions given to a computer Integrated Development Environment (IDE) software application for formatting code Library collection of useful resources, such as objects and functions Interpreter directs executes instructions in a high-level language w/out converting to machine language Assembler converts instructions written in low-level language Compiler converts high-level language into machine-readable. Algorithm set of steps that generates a finite a sequence ⯎ PROBLEM-SOLVING PROCESS OF ALGORITHM Problem Analysis – Algorithm Design – Coding – Execution ⯎ 2 COMMONLY USED TOOLS IN REPRESENTING ALGORITHMS Pseudocode – Flowchart PSEUDOCODE describe distinct steps of an algorithm FLOWCHART diagrammatic representation steps of an algorithm ⯎ 2 CATEGORIES OF FLOWCHART Program Flowchart - System Flowchart SYMBOLS NAME DESCRIPTION The start and end of a Terminal set Input/Output Shows any input/output Shows process Computer Processing performed by computer Process not specifically Predefined Processing defined in flowchart Used for writing any Comment explanatory Flowline Used for connecting symbols Input comes from a Document Input/Output document Wherein a decision Decision must be made Continued on the same On-page Connector page Continued to separate Off-page Connector pages ⯎ 5 RULES FOR CREATING PROGRAM FLOWCHARTS Only the standard symbols should be used in program flowcharts. The program logic should only show the flow from top to bottom/ or left to right. ⮛ Each symbol could only contain only one entry point and one exit point, except the symbol. It is known as single rule. The operations shown within a symbol should be expressed independently of any programming language. All decisions branches should be well-labeled. ⮛ INTRODUCTION TO JAVA Java is a free-to-use and highly dynamic high-level programming language. It was created by Sun Microsystems in 1995. Common use of java; game development, cloud computing, big data, AI, and Internet of Things. Java Runtime Environment (JRE) provides the class libraries and other resources that any java program needs. ADVANTAGES OF USING JAVA o Active Community Support o High-Quality Learning Resources o Inbuild Function Libraries o Security o Platform Independent o WORA “Write once, Run Anywhere” ⯎ A DEVELOPER MUST UNDERSTAND 2 THINGS TO USE JAVA Java Virtual Machine and Java Language and APIs. Java Virtual Machine (JVM) runs java applications as a run-time engine. ⯎ 2 BROAD CATEGORIES Compilers and Interpreter the programming statements or source code a java file extension java compiler converts the source code into binary program of bytecode Java APIs are pre-written java programs that plug and play existing functionally into a code The java language has only 50 keywords.

Use Quizgecko on...
Browser
Browser