Introduction to Computer and Programming Language

Get Started. It's Free
or sign up with your email address
Rocket clouds
Introduction to Computer and Programming Language by Mind Map: Introduction to Computer and Programming Language

1. Java Program Elements ~A Java program is made up of 'class definitions' ~A class definition must contain a 'header' and a 'body' ~A class contains zero or more 'methods' ~A 'methods' is a named section of code that also has a header & body -A method contains -program statements ~'Comments' are used to document the code, will not be interpreted -Single-line (starts with //) -Multi-line (enclosed by /* and */)

2. Application Software `Generic term for any other kind of sortware `E.g: Ms Word processor, Excel Spreadsheets, Web browsers, games

3. What is a Programming

3.1. Computer Programming `The art and scienceof designing and writting computer programs

3.2. Computer Program `A sequence of instructions written in a programming language to achieve a task/to solve a problem

4. What is a Computer An electronic device that stores and processes data

4.1. Hardware `The physical, tangible parts of a computer `Keyboard, monitor, disks, wires, etc

4.1.1. Organization `Central Processing Unit(CPU) `Main memory (RAM) `Secondary Storages `Input/ Output Devices

4.2. Software `Programs (e.t. MS Word) and data `Intangible parts of a computer `Both of hardware and software form a tool that can be used to solve problems

4.2.1. Organization `System Software `Application Software

4.2.1.1. System Software `System programs keep all the hardware and software running togeher smoothly `The most important system software is the operating system (OS) `Controls all machine activities `Provides the user interface to the computer `Manages resources such as the CPU, memory & I/O `E.g: Windows 10, Unix, Linux, Mac OS

4.2.2. `In contrast to hardware, software is an abstract, intangible entity `Software can be categorized as system or application software `It consists of program and data to be used to perform certain tasks `A program is a sequence of simple steps and operations, stated in a precise language that the hardware can be interpret `The process of programming involve algorithm design & coding

5. Hardware Components of a Computer

5.1. CPU `Brains of a computer `Handless all instructions that we give to the computer `Most expensive, the more expensive, the faster is a computer

5.1.1. CPU Component `Control unit `Program counter `Registers `Arithmetic Logic Unit `Accumulator

5.2. RAM `Temporary memory `Volatile (information stored in it will be lost when electric power supply is turned off `Directly connected to the CPU, using memory cells unit

5.3. Secondary Storage Provides permanent storage for information

5.3.1. Example `Hard disks `Floppy disks `CD-ROMs `USB Flash Drives

5.4. RAM VS Secondary Storage

5.4.1. RAM/Main Memory/Primary Memory `Volatile Fast `Expensive Low capacity `Works directly with the processor

5.4.2. Secondary Storage/Secondary Memory `Nonvolatile `Slow Cheap Large capacity Not connector directly to the processor

5.5. Secondary Memory Devices

5.5.1. Main memory Information is moved between main memory and secondary memory as needed

5.5.1.1. CPU `

5.5.1.2. Hard Disk Secondary memory devices provide long-term storage

5.5.1.3. USB Flash Drives `Hard disks `Floppy disks `USB drives `Writable CDs `Writable DVDs

5.6. Input/ Output Devices

5.6.1. Digital Information `Computers store all the informationdigitally `Number, text, graphic and images, video, audio, program instruction `In some way, all information is digitized-broken down into pieces and represented as numbers

5.6.1.1. Representing Text Digitally `For example, every character is stored as a number, including spaces, digits and punctuation `Corresponding upper and lower case letters are considered as different character

6. Binary Numbers `Once information is digitized, it is represented and stored in memory using the 'binary number system' `A single binary digit (0 or 1) is called a bit `A byte consist of 8 bits `Each byte in main memory resides at a numbered located called its address

7. Storage Capacity `Every memory device has a 'storage capacity' indicating the number of bytes it can hold `Capacities are expressed in various unit

8. Portablility ~After compiling a Java program into bytecode, that bytecode can be used on any computer with a bytecode interpreter and without a need to recompile ~Bytecode can be sent over the Internet and used anywhere in the world ~This makes Java suitbale for Internet applications

9. Setting up Your Computer to use Java ~Understand files and folders/directories ~Install JDK -Java SE Download Page -Documentation -Tutorial ~Install jGRASP ~IDE (Integrated Development Enviroment) -a software application that can facilitate programmers to develop program -Write, save, compile & run program in a single enviroment -E.g. jGrasp, Netbeans, Eclipse, Blue Jay

10. Errors ~It is common for programmer to make mistake in a program ~Three kinds of errors: -Syntax errors -Runtime errors -Logic errors

10.1. Syntax errors ~Grammatical mistakes in a program ~The grammatical rules for writting a program are very strict ~The compiler catches syntax errors and prints an error message ~Example: using a period where a program expects a semicolon -System.out.print ("Hi, I am Ali"), -System.out.print("Hello);

10.2. Runtime Errors ~Errors that are detected when your program is running, but not during complitation ~When the computer detects an error, it terminates the program and prints an error message ~Example: attemplting to divited by 0. total = 90/0;

10.3. Logic Errors ~Errors that are not detected during complitation or while running, but which cause the program to produce incorrect results ~Example: an attempt to calculate the total groceries that you buy, instead of summing the values, you subtract the values

11. Java Program Elements ~A Java program is made up of 'class defi