ALL UNIT FOR 1ST YEAR.docx
Document Details
Uploaded by RenownedComputerArt
Gyana Vikash Higher Secondary School
Tags
Full Transcript
**GYANA VIKASH HIGHER SECONDARY SCHOOL, BERHAMPUR** ***Study Material*** **+2 Science 1^st^ Year** **INFORMATION TECHNOLOGY** ***Guided By*** **Er. Sanjay Kumar Rauta** **Session -- 2024 - 2025** **[INDEX]** **Sl. No.** **Name of the Chapters** **Pg. No.** -----------...
**GYANA VIKASH HIGHER SECONDARY SCHOOL, BERHAMPUR** ***Study Material*** **+2 Science 1^st^ Year** **INFORMATION TECHNOLOGY** ***Guided By*** **Er. Sanjay Kumar Rauta** **Session -- 2024 - 2025** **[INDEX]** **Sl. No.** **Name of the Chapters** **Pg. No.** ------------- ------------------------------------------ ------------- ***UNIT-I*** **1** **HARDWARE CONCEPTS** **3** **2** **INPUT DEVICES** **8** **3** **OUTPUR DEVICES** **11** **4** **MEMORY DEVICES** **13** **5** **TYPES OF SOFTWARE** **16** **6** **APPLICATION SOFTWARE** **20** **7** **GENERAL PURPOSE APPLICATION SOFTWARE** **22** **8** **OPEN SOURCE CONCEPT** **24** ***UNIT-II*** **9** **INTRODUCTION IN PROGRAMMING** **28** **10** **PROGRAMMING FUNDAMENTALS** **41** ***UNIT-III*** **11** **DATABASE MANAGEMENT SYSTEM** **65** **12** **INTRODUCTION TO MY SQL** **70** **UNIT-1** **HARDWARE CONCEPTS** **[Computer's Basic Definitions: -]** **[What is a computer?]** The computer is an advanced electronics device which can take the data as input and processes these data as per instruction given by the user and gives your required output with great accuracy. The term 'computer' is taken from the word 'compute' which means to calculate. **[Charles Babbage]** is known as the father of computer. **[What is data]?** Data is a collection of raw facts and figures that need to be processed. Eg: - Each student's mark, roll number etc. **[What is information]?** When data is processed in a meaningful manner that is known as information. Eg:- Average marks of your classroom or section or school **[Data Processing:-]** It is the step-by-step refinement of the data to get out the desired information. It is manipulating data through operations like classification, sorting, merging, calculating and summarizing so as to provide the desired output. **[Difference between data and information]: -** **[Data]:-** i. Data is a form of raw facts and figures. ii. Data can be calculated in un-sequential manner iii. Data is an input form. iv. Data can't be understood. **[Information]**:- i. Information is the result of processed data. ii. Information is presented in a meaningful form. iii. Information is output form. iv. Information is completed an under-stand able. **[What is I.T.]?** I.T. stands for Information Technology. **[Definition]: -** It is the technology which deals with the management of information in computer over communication network. (or) I.T. is an integration of technology related to computers communication and also to management. **[Hardware]:** Hardware is those which we people can see it, touch it and also feel it. (Or) The tangible part / physical parts of the computer are known as Hardware. **Example:** All the Input devices, Output devices, Memory devices, Network devices etc\... **CHAPTER-1** **[BASIC COMPUTER ORGANIZATION]** A computer works very fast and does the following function. **[Input] :** It accepts data from the input device. The data entered in the computer is called input. **[Processing] :** It processes (carries out arithmetic or logical operations on) data and convert them to useful information. **[Output] :** It presents the final result for the user in form of output (printed or visual display format) **[Store] :** It stores data and instructions for the use of the system as and when requires. **[Control] :** It controls (co-ordinate and synchronize) all four operation described above. **[BLOCK DIAGRAM OF A COMPUTER]:** There are three parts mentioned below. 1. **[Input Unit]:** Used to enter input the computer, keyboard, mouse, microphone, web-camera etc. are input devices. 2. **[C.P.U]:** CPU stands for Central Processing Unit. CPU Processes data and produces the result. CPU is called 'brain' of the computer. All functions of processing take place in CPU. After processing it produces results. It is divided into 3 parts. i. **[ALU (Arithmetic and Logic Unit)]:** It can do the following operations i.e. add, subtract, multiply, divide etc. The result of a logical operation can be either true or false. ii. **[CU (Control Unit)]:** Control Unit controls the functions of computer. It is the bridge between ALU and Memory. It is responsible for controlling different parts of computer. It takes the input from input unit and gives instructions to store the data in memory. It processes data and sends results to the output unit. iii. **[Memory]:** Memory is the main part of the CPU where instructions are stored. The memory inside a computer is of two typed. It is RAM and ROM. Basically it is divided into two parts i.e. Primary memory and Secondary Memory. RAM (Random Access Memory) and ROM (Read Only Memory) are primary memory. Secondary memory consists of storage devices like hard disk, floppy disk CD, DVD, Pen drive etc. 3. **[Output Unit]:-**Used to print, see or listen the output. Printer, Monitor, speakers are output devices. **[Central Processing Unit (CPU): -]** i. The Central Processing Unit or simply the processor is a component in a digital computer which is capable of executing a program. ii. It is considered to be the brain of a computer system. iii. A CPU i.e. manufactured as a single Integrated Circuits (IC) is usually known as a microprocessor. iv. The term 'CPU' has been used in the computer industry at the beginning in the mid1970s. **[Working of a CPU]: -** There are 4 basic steps that nearly all Vonn Neumann CPUs use in their operations. i. **[Fetch]: -** The instruction is retrieved (by the control Unit) from the memory and fed into the Instruction Register (IR) where the operation and address parts are separated. ii. **[Decode]:** The control Unit then sends the operation part to the decoder and the address part to the M.A.R. (Memory Address Register). iii. **[Execut]e:** The decoder interprets the instruction and accordingly the control unit sends signal to the appropriate units to carry out the specified task. E.g. For any arithmetic or logical operation, the signal is sent to the A.L.U. The ALU carries out the necessary operation and sends a signal to the control Unit as soon as the operation is finished. iv. **[Write back]:** The result is returned back either to a register the CPU for further processing or a slower, but cheaper and larger main memory of the computer. As each instruction is executed, the address of the next instruction is automatically loaded into the PC register and step 1 to 4 is repeated. **[Memory]:-** i. Computer Memory is the storage space in computer where data is to be processed and instructions required for processing are stored. ii. The memory is divided into large number of small parts called cells. iii. Each location or cell has a unique address which varies from 0 to memory size-1. iv. For example, if computer has 64K words, then this memory unit has 64 x 1024=65536 memory location. v. The address of these locations varies from 0 to 65535. **[RAM]:** RAM stands for Random Access Memory. This means that the access time to read data from the first location to the last location is same. Both read and write operation is possible in this memory. This is volatile in nature i.e. contents will be lost once power is off. RAM is measured in Mega bytes and the speed is measured in nano seconds. RAM chips can read data faster than ROM. **[ROM]:-** ROM stands for Read Only Memory. In this memory only read operations is possible. There is no write operation possible in this memory. The content of this memory is written by the manufacturer. It is non-volatile in nature i.e. contents will not be lost after power is off. **[Difference between RAM and ROM:]** **[RAM]:-** i. RAM stands for Random Access Memory. ii. RAM allows the computer to read data quickly to run applications. iii. It allows reading and writing. iv. It is volatile in nature. **[ROM]:-** i. ROM stands for Read Only Memory. ii. It stores the program required to initially boot the computer. iii. It only allows reading. iv. It is non-volatile in nature. **[Units of Memory]:-** Bit is the smallest unit in the computer memory. 1 nibble = 4 bit ----------------------- 1 byte= 8bit=2 nibble 1KB (Kilo Byte) = 2^10^ Bytes= 1024 Bytes 1MB (Mega Byte) = 2^10^ KB = 1024 KB 1GB (Giga Byte) = 2^10^ MB = 1024 MB 1TB (Tera Byte) = 2^10^ GB = 1024 GB 1PB (Peta Byte) = 2^10^ TB = 1024 TB 1EB (Exa Byte) = 2^10^ PB= 1024 PB **[Communication Bus]:** A Bus is a bunch of parallel copper wires, which can be used for data transfer operation between the microprocessor and the peripheral devices. The information is transferred byte by byte. The CPU logically controls the transfer of data, instructions and commands between them. The Bus is of 3 types. They are: - **1)** Address Bus **2)** Data Bus **3)** Control Bus **1. [Address Bus]:** i. It is a group of wires or lines that are used to transfer the addresses of memory or I/O devices. ii. It is unidirectional. iii. The Size of the address bus always decides how much memory the microprocessor can directly access. iv. The width of the address bus determines how many locations it can access. Typical widths are 8bit, 16 bit, 32 bit and 64 bit. v. For example, if the address bus size is 16 bit, it can directly access 64 KB of memory i.e. 2^16^ locations or 65536 locations. The address bus size is 16 bit. So it is 2^16^ bytes = 2^6^ x 2^10^ bytes = 2^6^ x 1 KB = 64 KB **2[. Data Bus]:** i. Data bus is always bidirectional in nature. ii. Through Data Bus, The data can be transferred from the micro process to the peripheral devices or from the peripheral devices microprocessor. iii. The name of microprocessor is given depending on the size of the data bus. a. If the data bus Size is 8 bits, It is 8 bit microprocessor. b. If the data bus size is 16 bit, it is a 16 bit microprocessor. iv. Also the size of the data bus decides the range of data the microprocessor can accept. 3. **[Control Bus]:** i. The Control Bus is used by the CPU to direct and monitor the actions of the other-functional areas of the computer. ii. It is used to transmit a variety of individual signals (read, write, interrupt, acknowledge etc.) necessary to control and co-ordinate the operations of the computer. **[PORTS]:** A Port is a Physical docking Point using which an external device can be connected to the computer. 1. **[Serial Port]:** i. Used for external modems and older computer mouse. ii. Serial ports come in the form of 9 pin or 25 pin male connector. iii. Data travels at 115 kilobits per second (kbps). 2. **[Parallel Port]:** i. Used for scanners and printers. ii. Also called printer port. iii. Parallel Parts come in the form of 25 pin, iv. These Ports are built in Mother Board and consist of 25 wires. 8 of those wires are responsible to transfer data and control complete circuit. 3. **[PS/2 Port]:** i. Used for old computer keyboard and mouse. ii. Also called mouse port. iii. These are 6 pin low speeds serial connection Ports which are used with mouse and key boards mostly. 4. **[USB Post]:** i. USB stands for Universal Serial Bus used for short distance digital data communication. ii. It can connect all kinds of external USB devices such as external hard disk, printer, scanner, mouse, keyboard etc. iii. The port allows data transfer between devices with little electric power. iv. Most of the computers provide two USB ports as minimum v. Data travels at 12 megabits per second (mbps). 5. **[VGA Port]:** i. VGA stands for Visual/Video Graphics Array, used to connect monitor to a computer's video card. ii. It has 15 Holes. iii. Similar to serial port connector, but serial port connector, but serial port connect has pins, it has holes. 6. **[RJ (Register Jack) 45 Port]** i. This port is used for Ethernet connections and can be used between computer and any networked device such as a cable modern or a network hub. ii. It is an 8 wires connector. 7. **[RJ 11 Port]:** i. This port is for connecting to a telephone line. ii. It has 6 wire connectors in each and is smaller than RJ 45. ![](media/image2.png) **[CHAPTER - 2]** **[INPUT DEVICES]** The devices which are used to enter data and program instructions into a computer for storage or processing are called input devices. Without input devices, a computer cannot receive any information from the user and cannot be operated. 1. **[Keyboard:]** Key board is the most common and very popular input device which helps in inputting data to the computer. In the keyboard the keys or buttons are arranged in matrix form having rows and columns. As soon as a key is pressed, the microprocessor scans all the keys for the key press and detects which key is pressed. Then corresponding code to the key is sent. The keys in the key board are grouped into the following categories: i. **[Alphabetic keys] :** These keys include the letter keys A to Z. ii. **[Numeric or number key]:** These are 10 keys from 0 to 9 iii. **[Direction key] :** These are 4 arrow keys. Left ( ), right ( ), up ( ), down ( ) iv. **[Function keys] :** These are generally 12 function keys F1 to F12. v. **[Control keys] :** These keys like home, end, insert, delete, page down, page up, control, Alt, Esc provide screen control etc. vi. **[Special Purpose keys]:** These keys like caps lock, tab, pause, back space, space bar, enter, shift, print screen etc. which are used for special purposes. Alphabetic keys and numeric keys because the corresponding characters appear on the monitor screen, but the other keys do not have specific on the monitor screen, but the other keys do not have specific alphabet or numerals associate with that. These keys are used to perform some action and functions as defined by the software or user. 2. **[Mouse]:** i. Mouse is most popular pointing device. ii. It is an input device which is used to interact in windows environment. iii. Mouse was inverted by Douglas Engelbart of Stansford Research Centre in 1963 and pioneered by Xerox in the 1970s. iv. It is a small object which can roll along a hard, Flat surface. v. Its name is derived from its shape, which looks a bit like a mouse. vi. Its connecting wire that one can imagine to be the mouse's tail and the fact that one must make it scurry along a surface. vii. It controls the movement of the cursor or pointer on a display screen. viii. Using left button of mouse, different operations like selection, dragging, moving and pasting can be done. ix. With the right button we can open a context menu for an item, if it is applicable. There are following types of mouse. a. b. Mechanical Mouse c. Opto-mechanical mouse d. Optical Mouse e. Wireless Mouse 3. 4. **[Joystick]:** i. It is an input device consisting of a stick that pivots on a base and translates its angle or direction as data. ii. Joysticks are often used to control inputs in video games. 5. **[Light Pen]:** i. It is a light sensitive stylus attached to a video terminal to draw pictures or to select menu options. 6. **[Track ball]:** i. A Trackball is an input device i.e. mostly used in notebook, laptop computer, instead of a mouse. ii. The operation of a trackball are similar to a mouse. iii. Since it is a static device, on the top is moved by using fingers, thumbs and palms. iv. The main advantage of a track ball is that it requires less desk space than a mouse. v. A track ball comes in various shapes like a ball, a button, and a square. 7. **[Touch Screen]:** i. This device allows interacting with the computer without any intermediate device. ii. You may see it at KIOSKs installed in various public places. 8. **[Graphics Tablet (Digitizer]):** i. This device is used to inter data using a stylus. ii. Most commonly it is used to enter digital signatures. 9. **[Microphone]:** i. It is used to input audio data into the computer. ii. They are mainly used for sound recording. 10. **[OCR (Optical Character Reader/ Recognition):]** i. It is used to convert images of text into machine editable text. ii. It is widely used to convert books and documents into electronic files, to computerize a record keeping system in an office or to publish the text on a website. 11. **[OMR (Optical Mark Reader/ Recognition):]** i. Optical Mark Recognition is a technology of electronically extracting data from the marked fields such as check boxes, ovals and other shapes on printed forms. ii. OMR technology scans a printed form and reads predefined positions and records where marks are made on the form. iii. This technology is useful for applications in which large numbers of hand filled forms need to be processed quickly and with great accuracy such as checking of multiple choice questions (MCQ), surveys, reply cards and question pries etc. 12. **[BCR (Bar Code Reader)]:** i. This device read the bar code as input data. ii. It consists of a light source, a lens and a light sensor which translate optical impulses into electrical signals. iii. Also it contains decoder circuitry which analyses the barcode's image data and sends the bar code's content to the scanners output port. 13. **[MICR (Magnetic Ink Character Reader/Recognition)]:-** i. MICR is the common machine language specification for the paper-based payment transfer system. ii. It consists of magnetic ink printed characters of a special design which can be recognized by high speed magnetic recognition equipment. iii. This process excludes any markings like human signatures or bank seals etc on the cheques. iv. MICR is generally used in banks because of a large number of cheques to be processes every day. 14. **[Scanner]**: i. It is a device that optically scans images, printed text or an object and converts it to a digital image. ii. The scanned text can also be edited. **Scanners are of following types:-** a. Flat bed scanner b. Drum scanner c. Slide scanner d. Hand-held scanner 15. **[SCR (Smart Card Reader)]:** i. It is used to access the microprocessor of a smart card. ii. There are two broad categories of smart cards i.e Memory Cards and Microprocessor Cards. iii. Memory cards contain only non-volatile memory storage components and some specific security logic. iv. Microprocessor cards contain volatile memory and microprocessor components. v. The card is made of plastic, generally PVC (Poly Vinyl chloride). vi. Smart cards are used in large companies and organisations for strong security. 16. **[Biometric sensor]: -** i. It is used to recognize individuals based on physical or behavioural traits. ii. Biometric sensor is used to mark attendance of employees or students in organisation or institutions. iii. It is also popular as a security device to provide restricted entry for secured areas. 17. **[Web camera]: -** i. A web-camera is short for web cam. ii. A web cam is an input device because it captures a video image of the scene in front of it. iii. It is either built into the computer (eg-laptop) or it is connected through on USB cable. iv. This also captures video as data for computer with reasonably good quality. v. It is commonly used for web-chats. +-----------------+-----------------+-----------------+-----------------+ | **[All Input | | | | | Devices | | | | | Diagram]{.under | | | | | line}** | | | | +=================+=================+=================+=================+ | **Mouse** | **Keyboard** | **Scanner** | Biometric | | | | | Scanner | +-----------------+-----------------+-----------------+-----------------+ | **Web Camera** | **Joysticks** | Track Ball | **Touch Pad / | | | | | Screen** | | | | **Track Ball** | | +-----------------+-----------------+-----------------+-----------------+ | ![Light | Barcode Reader | **Microphone** | **Graphics | | Pen](media/imag | | | Tablet** | | e16.jpeg)**Ligh | **Bar Code | | | | t | Reader** | | | | Pen** | | | | +-----------------+-----------------+-----------------+-----------------+ | ![Magnetic Ink | Optical Mark | ![Optical | D:\\IT PCT-1 | | Card | Reader(OMR) | Character | FOR 1ST | | Reader(MICR)](m | | Reader(OCR)](me | YEAR\\images\\s | | edia/image20.jp | Optical Mark | dia/image22.jpe | card.jpg | | eg) | Reader | g) | | | | | | Smart Card | | Magnetic Ink | (Used for | Optical | Reader | | Character | Answer- Sheet | Character | | | Reader (Used in | Marking | Reader | | | Bank) | Purpose) | | | +-----------------+-----------------+-----------------+-----------------+ **[CHAPTER - 3]** **[OUTPUT DEVICES]** **[Definition]**: An electro mechanical device, which accepts data from a computer and translates than into a suitable form for the user is called an output device. These peripheral devices are classified in following categories: a. Monitors / VDU (Visual Display Unit) b. Printers c. Plotters d. Screen image projectors e. Voice response system (speakers) Output devices generate output in two formats. That is soft copy and hard copy. **[SOFT COPY]:-**A soft copy is an output, which is not produced on a paper, or some material, which can be carried to another place in physical form. These are temporary in nature to and vanish after to the use. Examples of softcopy are output or a monitor or sound produced by a voice response system. **[HARD COPY]:-**It is an out put on a paper or any other material which can be touched and carried for being shown to others. These are permanent in nature outputs of printer and plotters are hard copy outputs. I. **[Monitor (VDU- Visual Display Unit)]:-** A VDU also known as a monitor is the most basic and commonly used output device for viewing and displaying images. The monitor displays instructions we send to the computer and the instruction and results from the computer fed to us. VDUs are developed using Cathode Ray Tube (CRT), Liquid Crystal Display (LCD) or Light Emitting Diode (LED) technology, Projection Display(HD(High Definition)) etc. II. **[Television]:**- A television is a system for converting visual images into electrical signals, transmitting them by radio or other means and displaying them electronically on a screen. III. **[Printer]:-** Printers are most commonly used devices, producing hard copy of computer output. They are classified into 2 categories impact printers and non-impact printers. **[Impact printers:]** These printers leave the impression on the paper using ribbon hammer mechanism. - Dot matrix printer - Daisy wheel printers - Line printers - Drum printers - Chain printers **[Non impact printers] :** Printers that do not operate by striking a print head against an ink ribbon are called non-impact printers. Laser printer, Inkjet printers and Thermal printers are examples of non-impact printers. Non-impact printers are generally quieter and produce high quality prints. 1. **[Dot matrix printer:]** This printer prints characters by sticking an ink soaked ribbon against the paper. These can be used to generate carbon copies also. 2. **[Inkjet/DeskJet/bubble-jet printers]:** These all are low cost printers which use a controlled stream of ink for printing. 3. **[Laser printers]:** These printers use laser technologies to produce printed documents. These are very fast printers and are used for high quality prints. IV. **[Plotters]:** The printer discussed above are capable of producing graphics output, but lag in some cases like angering design architecture plan of a building, design of mechanical components of a care etc. These are the cases where high quality and perfectly proportioned graphics are required on large sheets of paper. A special type of output device used for this purpose is called a plotter. V. **[Speaker :]** Speakers are output devices used with computer systems to produce sound. They receive audio input from the computer's sound card and produce audio output in the form of sound waves. Speakers usually come in pairs, which allow them to produce stereophonic sound from two separate audio channels. VI. **[Digital projector :]** A digital projector is a device which connects to a computer and is used to project the video output from the computer onto a wall or screen. In class rooms they are often used with electronic white board. The projector can be portable and placed on a stand or it can be permanently fixed to the ceiling. They are used in - Class room teaching - Staff --training sessions - A presentation to an audience - Home theaters **[Memory Unit:]** Computer is the physical device. This is used to store data or information on a temporary or permanent basis. There are 2 classes of memory devices:- - Primary memory - Second memory **[Primary memory]** i. The primary memory of a computer system is otherwise called as main memory where we feed data and instruction to a computer for processing it gets stored in its main memory. ii. The primary memory is essential, but expensive. iii. The capacity of primary storage is limited. This is also volatile in nature. **[Secondary memory :]** i. The main memory has 2 district limitations that short storage capacity and volatile. ii. Because of volatile ,the main memory loses the stored information ,once the power is off. iii. These two limitations of the main memory are taken care of by the so called auxiliary memory or secondary memory storage. iv. These are non --volatile ,high capacity, cheap but slower memory devices. v. They are used to store a large volume of data on a permanent basis. **[Memory classification]** ![](media/image24.JPG)Memory in computer is used for the following purposes. i. Store, program and data during execution. ii. Store result of execution. iii. Store, program and data for our future reference. The memory is classified in hierarchical structure as follows 1. Register memory 2. Cache memory 3. Main memory 4. Auxiliary memory In the hierarchical structure of memory, the speed of access up the pyramid and the size of the memory increases down the pyramid. **[Diagram]** Reading from the memory or writing to the memory is called memory access. 1. **[Register memory:]** This memory is inbuilt in the C.P.U. This consist of several electronic registers. A register is nothing but a group of binary cells each capable of holding 1 bit. Register with n cells can store n bits of information. 2. **[Cache memory:]** The cache memory lies in the path between the processor and the main memory. The size of this memory is also less. This is used for storing frequently used program and data 3. **[Main memory:]** This is the memory where program is stored for execution by CPU. This memory directly communication with C.P.U. Unless program and data are located into this memory, execution is not possible. After execution the result is stored in this memory. It is volatile in nature so in order to cave the contents for loss, it is to be transferred to secondary memory access. Speed is higher than auxiliary memory. Main memory consists of RAM and ROM. **[Types of main memory]** **[RAM (Random Access Memory) :]** i. Random Access Memory or volatile memory is used by the system to store data for processing by a computer's Central Processing Unit (CPU) also known as the processor. ii. The key benefit of RAM over other types of storage is its retrieval time and consistency. iii. Because of this speed and consistency, RAM is used as main memory or primary memory storage. iv. As of today, the two types of RAM architecture being used in different computer system, i.e. Static RAM (SRAM) and Dynamic RAM (dram). **[SRAM (Static Random Access Memory) :]** The word static indicates that the memory retains its contents as long as power is on. However, as the power gets down, the data are lost. SRAM needn't be refreshed periodically. It is very fast but much more expensive than DRAM. **[DRAM (Dynamic Random Access Memory) :]**It is named so because it is very unstable. The data continuous to move in and out of the memory as long as power is available. DRAM must be continuously refreshed in order to maintain the data. DRAM is used for most system memory because it is cheap and small. **[ROM (Read Only Memory) :]** Read Only Memory which contains contents that once written, can only be read and used, but cannot be modified by the user. These contents are written by the manufactured. The contents of the ROM are not lost even in case of a sudden power failure, thus making it non-volatile in nature. **[PROM :]** PROM stands for Programmable Read Only Memory. We know that it is not possible to modify or erase programs stored in ROM , but it is possible for us to store our program in PROM cheap. Once the program are written it can't be changed and remain intact even if power is switched off. **[EPROM :]** EPROM stands for Erasable Programmable Read Only Memory.In this, contents can be erased and reprogrammed repeatedly. Erasing is possible by use of Ultra Violet(UV) light. **[EEPROM :]** EEPROM stands for Electrically Erasable Programmable Read Only Memory. In this erasing, the contents are possible by applying high voltage electricity rather than ultra violet light. **[Register Unit:]** A collection of special memory units to hold the information on a temporary basis inside the C.P.U (not in main memory) constitute a register. These are electronic memory units and facilitated speedy transfer of information between different parts of C.P.U. The various types of register are given below i. **[Memory Addresses Register]** (MAR): This register holds the address of the memory location, where the current instruction is stored. i. **[Memory Buffer Register]** (MBR): The contents of the memory word are held in this register. A memory word is either an instructions or data, which is read from written to a memory location. ii. **[Program Counter(PC) register:]** This register holds the address of the next instructions to be the executed during the execution of the current instruction, the content of the PC are updated, to point to the address of the next instruction to be executed. PC is also called pointer. iii. **[ACCUMULATOR (AC) Register:]** The accumulator register performs arithmetic and logical operations. it is used to store intermediate results during a program run. iv. **[Instruction Register (IR) :]** The current instruction , which is being executed is held here. every instruction has 2 parts, i.e an operation part and an address part. v. **[Input register (INPR):]** Input register receives the input character from an input device and stores it. vi. **[Output register (OUTR):]** Output register holds the character and supplies it to the output device. vii. **[Data Register (DR):]** It holds the memory operates. **[Auxiliary memory:]** i. As main memory is of limited capacity and size, it is not possible to store everything in main memory. ii. To supplement the necessity of more memory, auxiliary memory is used. iii. This is non-volatile in memory. iv. It is of unlimited capacity. v. Both read and write operation is possible. vi. Access speed is very less. vii. It stores data permanently until it is erased by the user. viii. Data or program stored in auxiliary memory is to be loaded into main memory for execution. ix. This is also known as secondary memory or back-up memory. x. Examples of this memory are Hard Disk, Floppy Disk, Magnetic Disk, Magnetic Tape, CD(Compact Disc), DVD(Digital Versatile/Video Disc), Blue Ray Disc, Pen Drive(PD),Zip Drive etc. **[TYPES OF SOFTWARES]** **[Definition]:** A set of programs that governs the operation of an entire computer system and its related devices is known as software. Software enables the hard ware to carry out the functions properly. In other words, the software instructs the hardware what to display on users screen, what kind of input to take from users and what kind of output to generate. Software makes the hardware to work. **[Characteristics of software]** - Software is intangible means it cannot be touched. - Software is a set of programs. - Software is complement to hardware. - Good software has portability. - Software makes the computer work. Software can be broadly divided into 2 categories such as - System software - Application software **CHAPTER-5** **[SYSTEM SOFTWARE]** i. System software is a collection of programs that governs the entire hard ware operation and supports the applications software. ii. System software helps run the computer hardware and computer system. iii. It is a large amount of software that is produced by the computer manufactured or software enterpriser. iv. Some common examples of system software are -- - BIOS - Operating System(O.S.) - Device drivers - Language processors **[BIOS (Basic Input/Output System)]** i. Commonly known as the system BIOS. ii. It is designed to be first set of instructions run by a computer when power on. iii. The initial function of the BIOS is to initialize system devices such as the RAM, hard disk, CD/DVD drive, video display card and other hard ware components. iv. The BIOS sets the machine hardware into a known state to the help the operating system to configure the hardware components. This process is known as booting or booting up. v. BIOS programs are stored on a chip (BIOS chip) which is fitted into the mother board of a computer system. **[Operating System: -]** Operating system is a system software which controls the automatic operation of the computer. i. It controls and co-ordinate all the resources available in the system. ii. It acts as an interface between the user and the computer. iii. The core part of the operating system is the kernel, stays loaded into main memory all the time. iv. The operating system performs important tasks like receiving input, sending information to output device, keeping track of files and directories in the memory as well as controlling the various peripheral units such as printers, monitors, keyboards etc. v. **Without an operating system machine can't work.** **[Need for an operating system :]** All operating system are designed to perform the following basic operation - Send information to the computer through the keyboard. - Display result on the monitor. - Send information to a printer. - Read or write files onto secondary storage. **[Major functions of an operating system :]** An Operating System is responsible for the following functions. - Communicate with hardware and the attached devices (Device Manager) - Manage different types of memories (Memory Manager) - Provide a user interface (Interface Manager) - Provide a structure for accessing an application (Program Manager) - Enable user to manipulate programs and data (Task Manager) - Manage the files, folders and directory systems on a computer. (File Manager) - Provide basic networking structure for LAN (Local Area Network) and Internet (Network Manager). - Provide a minimal security to the computer system through authorization (user name) and authentication (passwords). (Security Manager) ![](media/image26.JPG) **[Types of operating system:]** - **[Single user operating system :]** Allows one user to operate the computer and run different programs on the computer. MS-DOS is a common example of single user operating system. - **[Multi user operating system]** Allows two or more users to run programs at the same time on the single computer system. Unix, Linux, Windows are common examples of multi user operating system. - **[Real time operating system]** Responds to input instantly. Real time operating systems are commonly found and used in robotics, complex multimedia and animation, communications and has various military and government uses. Linux and windows ce are examples of real time operating systems. - **[Multi processing operating system]** Supports allocating programs on more than one cpu - **[Multi tasking operating system]** Allows more than one program (task) to run concurrently. - **[Multi threading operation system]** Allows different parts of a single program to run simultaneously. Some time operating systems are also categorized as i. PC (Personal Computer) Operating System ii. Server Operating System iii. Mainframe Operating System iv. Handheld Operating System v. Mobile Operating System **[Device driver :]** i. A device driver is system software that operates controls a particular type of device that is attached to a computer. ii. Device driver simplify programming by acting as translator between a hardware device and the applications or operating systems that use it. iii. All computer accessories like printer scanner webcam etc come with their own driver software. **[Language processor]** A computer system understands the instructions only in binary language (also called as Machine Level Language(M.L.L.) or known as Low Level Language (L.L.L.) or Binary Level Language (B.L.L.)). Any program written in high level language (HLL) is called source program. As source program is written in HLL, computer cannot understand it. So it has to be translated to Machine Level Language. The software which does the translation of source program to object program and vice-versa is called as language processer or translator. Basically there are 3types of translator - Assembler - Compiler - Interpreter **[Assembler :-]** A programming language which is very close to the Low Level Language is called an assembly language.This language consists of mnemonic codes, is difficult to learn and is machine dependent. A language processer which translates a program written in assembly language into machine language is called as assembler. **[Compiler : -]** Compiler is a system software which translates the HLL into MLL. It is software which translates the whole program at a time when it is completely fed into the computer. Using compiler all the errors appear at a time. So it becomes a very tedious job of locate and correct errors. **[Interpreter :-]** It is also a system software which translators the HLL to MLL. It interpretes each line simultaneously when enter to the computer. As we press enter key the message is inserted in the computer and the same line it gets converted into machine language by the help of interpreter. **[Difference between compiler and interpreter: -]** **[Compiler]:** 1. It translates source code into object codes as a whole. 2. Requires more money. 3. Program execution is very fast. 4. Compiler saves the machine codes permanently for future references. 5. If error is detected nothing being executed. 6. Slow for debugging (removed of mistake from a program). **[Interpreter]:** 1. It translates the statements of the source code one by one and execute immediately. 2. Requires less money. 3. Program execution is slow. 4. Machines codes produced by interpreter are not saved. 5. If error is encounter execution stops but previous statements are already executed. 6. Good for fast debugging. Application software is a set of programs to carry out a specific task like word processor, spreadsheet presentation tools, library management software, railway reservation, antivirus etc. Generally an application software can perform only one specific job and cannot used for something else. For instance, a library management reservation system or word processing software is generally not used as a spreadsheet. **[Difference between application software and system software :]** **[System software] :** 1. System software normally developed by manufacturer. 2. Without system software computer cannot work or interact with the user. 3. System software cannot be modified by the user or programmer. 4. System software is automatically loaded in the memory at the start of the computer. It is called automatically by the booting process of the computer. **[Application software :]** 1. Application software are those programs which are written by the user. 2. Without an application software a computer may work. 3. Application programs are modifiable by the user or the programmer. 4. An application program is not loaded in the memory at the start of computer it has to be called by the user Following are the example of application software - Utility Software - General Purpose application software - Specific Purpose application software - Developer tools **[Utility Software]** After all the basic and necessary software like operating system and device drivers have been installed we also require some additional software to keep our computer system efficient and trouble free. Utility software helps to manage maintain and control computer resources. Examples of utility software are as follows 1. Compression 2. Back-up software 3. Disk-defragmentation 4. Anti-virus 5. Text-editor **[Compression software :]** Using this software one can reduce(compress) the storage size of any computer program or file while nor in use. This utility comes in handy when we want to transfer a big program or computer file from one computer to another either through Internet or using storage devices like pen drive ,CD or DVD. **[Compression tool :]** A Software program that can compressed and decompressed a specific file type is called as compression utility. Examples of such utilities include 7-zip,PKZip,Win Ace, Win Zip and Win Rar. **[Backup software :]** These utility software facilities you to take regularly back up of important files and folders stored in a drive into another storage device like a pen drive, CD or DVD or another computer. This back up data can be restored in case of any unforeseen situation. **[Disk-defragmentation software :]** When computer system finds a file too large to store in a single location, it splits the file and stores it in pieces which are logically linked. This simply means that different parts of the file scattered across the hard drive in non-contiguous location. Disk defragmentation utility software speeds up the system by rearranging such fragmented files stored on a disk in contiguous locations in order to optimize the system performance. Disk-fragmenting a disk minimizes head files from and writes files to the disk. It also reduces system start up times. Following figure shows three fragmented files named ak, (stored in 6 fragments), sp(stored in 5 fragment) and dp(stored in 4 fragment) then running the defragmentation utility reorganize the file contents in consecutive location. **[Diagram ]** **[Antivirus software]** A computer VIRUS (Vital Information Resource Under Seize) is a computer program intended to hamper the performance of a computer system. These virus are copied into the system through some other infected programs (copied into the system) or down loaded from the Internet. The utility software provides the user with a virus free work environment by restricting the entry of any unwanted program into the system. **[Text editor :]** This utility software helps one to create store or edit a basic text files. A text file generally stores English type text and can also store numeric and special characters with little formatting. Popular examples of text editor are Note pad, Note pad2, Notepad ++, Geedit, Kwrite. Some of the application software are designed for general day to day applications and uses. Some of these popular general purpose application software are discussed below: **(1) [Word Processor]: -** i. Word Processor is general purpose application software that facilitates the creation of text documents with extensive formatting. ii. The user can not only create a document and add lines into it but can also use different types of fonts of various sizes along with features like underlining or making a certain part of the text bold. iii. One can also add clipart and other graphics into the document. iv. Therefore we can use word processing software for various tasks from writing a simple document to designing special art effect. v. Preparing a common letter for different addressee (using mail merge feature), writing stories, applications and designing posters (using clip art and graphics) are some of the common applications of a word processor. vi. Popular examples of Word processing software are Microsoft Word and Writer (open office). **(2) [Presentation Tools]:-** i. Presentation Tool is general purpose application software that facilitates the creation of presentations on any particular topic like Uses of Internet, Global Warming, Social networking or any topic of social interest and importance. ii. It allows one to not only create a presentation and add slides into that but also allows use of various formatting features like adding different types of background, different fonts, animations, audio, video, clipart and other graphics. iii. Popular examples of Presentation tools are Microsoft Power Point and Impress (open office). **(3) [Spreadsheet Tools]: -** i. Spreadsheet Tool is general purpose application software that facilitates creation of tabular forms where some text and numerical values can be stored. ii. A spreadsheet tool not only allows one to create a document and add data into it but also allows creation of different types of charts and graphs based upon the numerical data stored in a worksheet. iii. Furthermore, all common mathematical and statistical formulae can be used on the stored numeric data and various text functions can be used on the text stored in the worksheet. iv. Popular examples of Spreadsheet tools are Microsoft Excel and Calc (open office). **(4) [Database Management System]:** i. Database Management System is general purpose application software that facilitates creation of computer programs that control the creation, maintenance, and the use of database for an organization and its end users. ii. It allows the user to not only store data but also control the addition, deletion, management, and retrieval of data in a database. iii. It also allows importing and exporting the data to many formats including Excel, Outlook, ASCII, dBase, FoxPro, Oracle, SQL Server, ODBC, etc. iv. Popular examples of Database Management System are Base (Open Office) and Microsoft Access. Some application software are made for performing specific tasks generally used by the Institutions, corporate, business houses, etc. and such software come under the category of specific purpose application software. The usage of few specific purpose application software is explained below: **(1) [Inventory Management System & Purchasing System]:-** i. Inventory Management System is generally used in departmental stores or in an institution to keep the record of the stock of all the physical resources. ii. For example, a school keeps record of the number of computers, printers, printing sheet, printer cartridge available in the school\'s computer department. **(2) [Payroll Management System] : -** i. Payroll Management System software is used by all modern organizations to encompass every employee of the organization who receives a regular wage or other compensation. ii. All different payment methods are calculated by the payroll software and the appropriate paychecks are issued. **(3) [Hotel Management]:-** i. Hotel Management software refers to management techniques used in the hotel sector. ii. These can include hotel administration, accounts, billing, marketing, housekeeping, front office or front desk management, food and beverage management, catering and maintenance. **(4) [Reservation System]: -** i. Commonly seen at railway reservation offices, this software helps the concerned department to automatically check the availability of the seats or berths of any train for any particular date with incomparable speed. ii. Now a day's using the internet and this software one can book or reserve tickets of any train for any dates with in no time. **(5) [Report Card Generator]: -** i. This software is commonly used in schools by the examination department to prepare and generate the report card of students. ii. It performs all possible mathematical calculations and checks whether a student can be promoted to the next class or not. It can also be used to calculate the class wise ranking of a student. **[Developer tools]** When a programmer starts the process of writing a program to develop software for any type of application, he/she requires a series of software developing tools like code editor, debugger and compiler. A platform where all these software developing tools are bundled into a package is known as Integrated Development Environment (IDE). **[Integrated Development Environment]** An Integrated Development Environment (IDE) is an application program that consists of all required software developing tools required for developing software as part of a single interface. It typically consists of the following tools: - Source Code Editor - Graphical User Interface (GUI) builder - Compiler / Interpreter - Debugger - Build Automation tool - Example : Net Beans IDE , Visual Basic IDE. OSS(Open Source Software) : =========================== Examples of open source software : ================================== - Office automation software --open office, k office and neo office - Operating system -- Ubuntu, fedora, Linux, android - Web browser- Mozilla, Firefox - Web design- NVU, bluefish - E-commerce- Zen cart, virtue mart - Content management systems- Joomla, drupal - Internet related software- Mozilla foundation (Firefox and thunderbird) - Programming related software- java, python, my sql Example of proprietary software- ================================ - office auto motion software- Microsoft suite (MS Office) - operating system --WINDOWS, IOS, MAC OS - web browser- Internet Explorer, chrome - audio and video playback- windows media player - Programming related software- visual basic, C, visual basic IDE etc. Freeware : ========== i. FOSS stands for Free Open Source Software and FLOSS stands for Free Libre Open Source Software. ii. The word „libre/livre‟ means freedom. iii. This software are free as well as open. iv. That is any one is freely licensed to use, copy, study and change the software in any way and source code is openly shared, so that the developer or programmer are encounter to voluntarily improved the design of the software. Examples of FOSS/FLOSS ====================== 1. **GNU :-** i. It is an open source operating system developed by **RICHARD M STALLMANIN** in 1983. ii. Unlike Linux, it supports the GNU **HURD KERNEL** and is intended to be a complete Unix compartable software system. iii. Now it offers a wide range of softwares including applications apart from operating system. 2. LINUX :- ======== iv. It is an popular open source operating system original written by **LINUS TORVALDS**, a student of finish university in **1991.** v. It is a part of popular web services program LAMP (LINUX,APPACHE,MY SQL,PHP). vi. Linux can be downloaded from http:[//www.linux.org.](http://www.linux.org/) 3. MOZILA:- ======== i. It is a popular free and open source software. ii. It was developed to create internet suites like web browser, E mail client, html editor, IRC (Internet Relay Chat) client etc. iii. It is one of the most freely downloaded. iv. Software on the net http://[www.mozila.org](http://www.mozila.org/) 4. OPEN OFFICE : - =============== vii. It is an office application suite mode to be in competition with Microsoft office. viii. Open office is based on the source code of older version of "star office" which was acquired and made open source by **SUN MICROSYSTEMS.** ix. Open office includes the following components. - Writer (word processer) - Calc (spread sheet) - Draw (graphics software) - Impress (presentation program) - Base (data base program) - Math (edit for mathematical) 5. JAVA : - ======== x. It is a programming language originally developed by **JAMES GOSLING** at **SUN MICRO SYSTEMS** in 1991. xi. The language was first called OAK, but later renamed as java. xii. It was released as a free and open source software product of sun Microsystems. xiii. The language derives much of its syntax from C and C++ ,but it has fewer low level facilities than either of them. xiv. It is intended to let application developers, "Write Once ,Run Anywhere (WORA)" meaning the code that runs on one platform does not need to be recompiled to run on another. xv. java can be downloaded from http:/[/[www.java.com]](http://www.java.com/) xvi. 6. NETBEANS : - ============ xvii. Netbeans is an Integrated Development Environment (IDE) for developing applications in programming languages like java,PHP,C AND C++ AND HTML. xviii. It is also an application platform frame-work for java desktop applications and others. xix. Netbeans IDE written in java can run on platforms like windows ,Linux, Solaris etc. compatible with Java Virtual Machine (JVM). xx. Netbeans can be downloaded from [[http://www.netbeans.org]](http://www.netbeans.org/) 7. MY SQL : - ========== xxi. My SQL is perhaps the most used open source Relational Data Base Management System (RDBMS) that runs as a server providing multi user access to a number of data bases. xxii. MYSQL development project has made its source code available under the terms of the GNU general public license as well as variety of proprietary agreements. xxiii. It supports many languages such as C,C++,PHP,ruby,java,python etc. xxiv. It can work on many platforms such as MS Windows, linux, Mac-Os etc. xxv. it is used in many high profiles, large scale, world wide web products including google, facebook xxvi. It can be easily downloaded from http:[//www.mysql.com](http://www.mysql.com/) COMMON OPEN STANDARDS : - ========================= - Availability - Maximize end user choice - No royalty - No discrimination - Predatory practices EXAMPLES OF COMMON OPRN STANDARDS ================================= A. **WWW(World Wide Web) :** HTML (Hyper Text Mark Up Language) : ==================================== DHTML(Dynamic Hyper Text Mark Up Language) : ============================================ XML(eXtensibily Markup Language) : ================================== ODF (Open Document Format) : ============================ -.odt for word processing (text) documents example file.odt -.ods for spread sheet files. Eg-file.ods -.odp for presentation files ex-file.odp -.odg for graphics files ex-file.odg -.odb for database files ex-.odb TCP/IP (Transmission Control Protocol/Internet Protocol) ======================================================== i. TCP/IP suite networking standards provides the foundation for the network infrastructure of the internet. ii. It Is a two layered pocket switching specification in which data to be communicated between two end points on a network is first broken up into smaller data packets that are then individually routed through the network from the source to the destination points. iii. The higher layer, transmission control protocol manages the disassembling of the data into smaller packets at the source and the reassembling at the destination point upon receives of the data packets. iv. The lower layer internet protocol handles the addressing and routing of each packet so that it gets to the correct destination. **[Unit − 2]** **[Introduction to Programming]** **[Introduction:]** **[Program:]** A set of structured instructions**.** **[Programming:]** The process of writing specific instruction in a computer language. **[Programmer/coder:]** Person who write such programs**.** **[Programming languages:]** Language used in computer program. **[What is java?]** It is originally known as **'oak'**, a computer programming language (also known as high level language). It has set of rules that determine how the instructions are to be written. These rules are known as syntax. **[History of Java:]** **James Gosling** in 1991 developed the java language. It is a **Write Once Run Anywhere**(WORA) type language providing no cost run time popular platforms. **[Advantages/charters tics of java:]** 1. **[object oriented]:** It is purely object-oriented language. It helps the programmers to develop more reliable & error free code. 2. **[Platform independent]:** Java is a platform independent which is portable and easily executed on all operating systems (windows, Linux, Solaris). 3. **[Simple:]** Java is designed to be easy to learn. 4. **[Secure:]** Java generates an intermediate code called Byte code which is very secure because nobody can understand if anyone tries to access the code. 5. **[Portable:]** It ensures portability in 2 ways: First java compiler generates byte code instructions that can be implemented on any machine. Secondary the size of primitive data types are machine independent. 6. **[Robust:]** Java eliminates error by focusing mainly on compile time error checking & run time checking. 7. **[high performance]**: With the use of Just In Time (JIT)compilers, java enables high performance. 8. **[distributed:]** Java is designed for distributed environment of internet. **[Java Virtual Machine (JVM):]** JVM is a run time environment which acts as an interpreter & translates the byte code into object code (machine language). It is a platform independent execution environment. As C & C++ platform dependent so developers of java wanted it to be platform independent language. Hence the concept of JVM was included in java. **[Source code:]** The core program written in any computer language (like C, C++, java). It is a collection of computer instructions written by using any human readable computer language. **[Object code:]** The program in the form of machine instructions or binary instructions (computer readable form). In case of java it is produced by JVM. **[Byte code:]** In java when source code is compiled, it doesn't directly convert into object code rather it converts into byte code. Byte code is machine instruction. **[Note:]** Javac--compiler that converts source code to byte code. JVM -- interpreter that converts byte code to machine language code. Source code -- (program.java) →compile →byte code Byte code -- (program. class) → JVM →machine code **[Rapid Application Development (RAD):]** - Rapid Application Development is abbreviated as RAD. - It is an object-oriented approach for software development. - It includes method of development as well as software tools known as ICU (I - iterative development, C - Construction of prototype, U - use of Computer Aided Software Engineering tools) - It includes analyzing, designing, building & using phases. **[Diagrammatic representation of RAD:]** ![](media/image28.png) **[Two methods of RAD system:]** 1. **[NetBeans IDE:]** It is a cross platform RAD tool for creating visual desktop & web application for Linux, windows, MacOS. 2. **[eclipse:]** It is a RAD environment focusing on web application development. **[Advantages of RAD:]** - Increase speed of software development. - Reduced complexity of development. - Simplicity & usability of GUI components. **[Java Development Kit (JDK):]** Java programs are mainly of two types: **[Applets:]** These are the programs executed by web browser. **[Applications:]** These are the programs executed directly on your machine. JDK is a program development environment for writing java applets & application. **[Java Development Kit includes serial tools:]** **[1. JRE (Java Runtime Environment):]** It used to run the pre developed applets or applications in JDK. **[2. Javac:]** The compiler is known as java c. Converts source code compiled byte code. **[3. Java:]** Java interpreter / coder normally called as java. Executes java applications. **[4. Java doc: ]** Generates source code html files documentation. **[5. Jar:]** It is an achiever to create jar files. It contains class, image & sound files for java application or applets gathered into a single file &possibly compressed. **[6. Applet Viewer:]** It provides environment for testing applets. It loads html files & displays the application in a browser. **[Integrated Development Environment (IDE):]** - It is abbreviated as IDE. - It is a software tools which create & debug programs easily. - IDE brings all programs easily. - IDE brings all programming tools into one environment place along with project management tools to increase programmer productivity. - IDE include: 1\. source code editor →programmers write source code. 2\. compiler → source code→ intermediate cache Interpreter → execute compiler generated byte code. 3\. Build automation tools help to automate the processes like compiling, debugging & deployment. 4\. GUI simplifies the creation of GUI. **[IDE tools:]** **[NetBeans IDE:]** - NetBeans IDE is an Integrated Development Environment used as a tool for programmers to edit, compile, debug &deploy programs - It is a free product developed under open source license with no restriction on use. - The IDE runs on windows, Linux, MacOS and other UNIX based system. - NetBeans IDE incorporates many tools to facilitate creating, managing and running a program included features like a Graphical User Interface (GUI) for development, a fancy text editor, an o/p window, button, to compile and run the program, a debugger. **[Different parts of IDE windows:]** The Net Beans IDE contains various controls and menus via which, a user can easily interact and woek according to their requirements. 1. **Title Bar:** It displays the name of the application or a program. 2. **Menu Bar:** It provides the various commands used to work with Nets Beans IDE, such as file, edit, view, etc. 3. **Tool Bar:** It provides a way to quickly access the commonly used commands. 4. **Palette Window:** This window contains all the containers and other graphical components such as labels, panels, text fields etc. 5. **Projects Window:** This window shows a logical structure of different project content. 6. **Inspector Window:** This window displays a hierarchical tree structure of all the components used in the current form. 7. **Properties Window:** This window displays the editable properties of the currently selected graphical component. 8. **Design Area:** It is the primary area used for creating and editing of Java forms. 9. **Source Editor:** It is a fully featured text editor program which includes a compiler, debugger and other components of IDE. 10. **Output Window:** This window shows the output messages from the Net Beans IDE. Output window automatically show the messages after compilation of a program. **[Integrated modules of IDE:]** **[1.NetBeans profile:]** It is a tool for monitoring of java application. GUI design file enables developer to prototype and position graphical component. **[2.Java editors]** **Notepad:** On windows machine we can use any simple text editor like notepad. **NetBeans**: It is a java IDE that is open source and free. **Eclipse**: It is also a java IDE developed by eclipse open source community. **[Concepts of GUI (Graphical user interface):]** - A GUI is a graphical user interface to the computer. - Applications use elements of GUI that come with operating system. - Examples of GUI includes windows, pull down menus, buttons, scroll bars, iconic images, the mouse. - GUI operating system monitors each type of windows for its functions through activities, these activities are called events. - New forms of input are called events and style of programming used to process is called event-driven programming. - Event is an occurrence of an activity. **[Rapid Application Development with IDE:]** - It is a programming system that enables programmers to quickly build working programs. - RAD system provides number of tools to help build **Graphical User Interface**. - Some of the most popular RAD systems for windows are visual basic and NetBeans is highly suitable on java programs. **[How to design GUI Application:]** Basic step to create and display GUI application: **1. [Create forms]**: forms can be created within existing projects. Form contains containers, sub-containers and components. **2. [Edit forms]**[:] a component within a form can be modified directly or through the project editor. **3. [Preview forms]**: with this designing capability the form can be tested without compiling or running it. **4. [Deploy the GUI application]**: Applications are distributed as JAR files. Jar should contain all necessary libraries. **GUI programs in java is created by using following three types of software**: 1. **[Graphical components]**: It includes text box, button or menu. Each component has properties such as size, color, title, alignment etc. 2. [**Event**:] It gets information about the events and respond to them. 3. **[Event handle]**: It does the work for the user in case of event occurs. **[Role of API in java:]** - API (Application Programming Interface) is a collection of pre-written packages, classes and interface which helps the interaction between humans and computers. - Java programming books are performed by API's classes which helps to minimize no of lines written within pieces of code. **[JDK components:]** - Java compiler - Java Virtual Machine (JVM) - Java Application Programming Interface (API) - The API is a library of available java classes, packages, and interfaces. The three type are as follows \(i) Official java core API, which is bundled with JDK download. \(ii) Optional official java API's, which may be downloaded when needed. \(iii) Un-official API's, which are third party API's that may be downloaded from source websites. **[Three Frames of java:]** - The First frame shows an API component (classes and packages). - The Second frame shows an interfaces, classes and exceptions of a particular selected packages. - The Third primary frame provides an overview of all API packages to show the index, class hierarchy and help sections. **[Java GUI:]** - Java AWT (Abstract Window Toolkit) is an API to develop GUI. - They are platform depended; the components display according to the view of operating system. - Java AWT package provides classes such as text field, label, text area, radio button, check box, choice, list etc. **[Java GUI tool kit:]** GUI is created with the following objects, Components (defers screen element such as text field, scroll bar, menu) Events Listeners **[Graphical components available in java:]** They are of 2 types: - Container control - Child control - Container controls hold other control within it. Ex- panel or frame - Controls inside the container are called child controls. Ex- button, list **NOTE:** GUI application contains top lens, contain that hold another context in it. **[SWING:]** - Swing is a GUI widget tool kit for java. - It is a part of parcel Java Foundation Classes (JFC) which is an API for doing a Graphical User Interface (GUI) java program. - Swings are written entirely in java and they are platform independent. So they are termed as light weight. - It includes all the components from a modern tool kit like table controls, list controls, tree controls, buttons and labels. **[Difference between Java AWT and Java swing:]** **1.** AWT components are platform- **1.** Java swing components are platform- **2.** Components are heavy weight. **2.** Components are light weight. **3.** Provides less components than swing **3.** Provide more powerful components **[Components of SWING:]** 1. **[Label:]** - It is the display area for a text string or an image. - It is created through java component. - It displays single line of read only text. - Text can be changed by application but a common user cannot edit it directly. **[Basic interface components \[Developing general application\]]** **[1. Label:]** - It is used to display text that a user cannot edit directly. - It is created through Label component. - A label displays a single line of read only text. ![](media/image30.png)**\ ** **[Properties:]** - **[Background:]** Set the background color of the label. Color of label is displayed when opaque property is true. - **[Enabled:]** It is used to set weather the label is active or not or at run. - **[Font:]** This property is used for set font style for text. - **[Foreground:]** It sets the foreground color or it display in the label. - **[Text:]** Used to specify the text to be displayed in the label. **[Methods:]** - **void setText(string)** Ex. \.setText("Name"); - **String, getText()** Ex. String str = \.getText(); **[Text field:]** - Text field is used to display information entered by the user at the run time. - Numeric data cannot be displayed in a text format. - It is derived from JTextfield component. **[Properties]** **[1. Background]**: It sets the background color of the text field. **[2. Edittable]**: It is used to edit context of the text field. It should be set to true that the user can edit it on run time. **[3. Font]**: It sets a font style for the text to be displayed in the font field. **[4. Enabled]**: It sets the font field as activated or deactivated. **[5. Foreground]**: It sets the foreground color of text to be displayed in the text field. **[6. Text]**: Specifies the text should be displayed in the textfield. **[Methods:]** - **void setText(string)**→used to set the text displayed by the text field. Ex: \. setText("Name"); - **String getText()**→used to fetch the text displayed in a text field. String str= \. getText(); - **isEditable ()**→ returns the current state of text field. If value true than user can edit the text available. - **isEnabled ()** → enables whether the text is in activated state or deactivated. **[Text Area]** - It provides large space for text entries. - It is created through JTextArea component class. ![](media/image32.png) **[Properties:]** **1. Background:** This property is used to set the background color of the textarea. **2. Foreground:** The property is used to the set foreground color of the text available in the textarea. **3. Enabled:** This property is used to set the textarea as enabled. **4. Editable:** Sets whether the textarea is editable or not. Default state/value is true. **[Methods]** **String getText():** \.setText("Name"); **Void setText(String):**String str=\.getText() **[Button]** - A button is created through JButton class. - Button is generally known as command button. - Used generally to begin, interrupt or end a particular process. - A button is used either by clicking on or by texting to it and pressing enter. **[Properties:]** 1. **Background: Sets the background color of the button.** 2. **Enabled: This property is used to set whether the button is active or not at the run-time.** 3. **Font: This property is used to set font style of the text displayed on the button.** 4. **Foreground: This property is used to set the color of the text displayed on the button.** 5. **Text:** This property is used to set the text specified on the button. 6. **Label**: It is used to set the label of the button. **void setText(string):** Is used to set text which will be displayed on the button. \.setText ("Push Button") **String getText():** Method used to fetch the text displayed on the button. String str = \.getText() **[Checkbox ]** - It is a graphical component that can be either "on" (true) or "off" (false) state. - It is created through JCheckbox class. - Each time the user clicks it, its state changes. **[Methods:]** **[Properties:]** 1. **Button Group:** It sets group of buttons in which current control belong. 2. **Font**: Specifies the font which will be displayed with the checkbox. 3. **Foreground**: sets the font color of the checkbox. 4. **Label**: used to set the checkbox label. 5. **Selected**: it sets the current value of the checkbox. If true it is displayed as checked otherwise unchecked. 6. **Text**: sets the text should be displayed with the checkbox. **[Methods:]** **voidsetText(String str)**: It sets the text which will be displayed with the checkbox. For Ex : \.setText("New Checkbox"); **String getText():** It fetch the text displayed with the checkbox. **boolean isSelected()**: Relates the current state of the checkbox. **void setSelected(Boolean b)**: used to set the current state of the checkbox. **[Radio button:]** It is a group of mutually exclusive buttons in which only one button can be selected at a time. It is supported by JRadioButton class. ![](media/image35.png) **[Properties]** 1. **Background: This property is used to set the background color of the radio button. The color of the radio button is display when it is set to be true.** 2. **Button Group:** It sets the name of group of Radio button. 3. **Enabled: This property is used to set whether the radio button is active or not at run time.** 4. **Font**: It sets the font style of the text to be displayed on the radio button. 5. **Foreground**: Sets the font color of the text to be displayed with radio button. 6. **Label**: Sets the text displayed with any other control. 7. **Selected**: Sets the current state of the radio button. 8. **Text: This property is used to set the text to be displayed with the radio button.** **[Methods]** **void setText(Boolean b)** :Sets the text when will be displayed with the radio button. Ex :\.setText("New"); **String getText()** :It is used to fetch the text displayed with the radio button. String str =\.getText(); **boolean isSelected()** :it returns the current state of the radio button. **viod setSelected(Boolean b)** :it sets the current state of the radio button for the selection process. **[Developing General application: ]** **[Frame:]** - It is a top-level window with a title and a border. - Frame is created using JFrame components. - Frame is a super class which provides basic attributes and behavior of a window. A title bar and buttons to minimize, maximize and close the window. - It provides a home for the other components of the interface. **[Properties:]** 1. **Background: This property is used to set the back ground color of the frame.** 2. **Title: This property is used to set the title of the frame.** 3. **Default close operation**: This property sets hide in close. **[Methods:]** **integetDefaultCloseOperation()**: when user initiates close on the frame it returns the operation. **Void setDefaultCloseOperation()**: sets the operation happen by default when user initiates close on the frame. **stringgetTitle**: gets the title of the frame. **voidsetTitle(String):** sets the title for this frame to be specified title. **[Dialog Box]** It is a small separator sub-window which appears on the screen for providing / requesting to/from the user. It is an independent sub-window to carry temporary notice apart from the main swing application window. **[The type of controls:]** **[JDialog: ]** It displays a dialog box which has minimize, maximize and close icons in the title bar of the dialog box. It presents error messages or warning a user. **[JOptionPane]:** It creates pop-up window with void contents. It displays message box or an i/p box. **[Structure of JOptionPane]** **[Dialog type:]** 1. **Input dialog**: - It is used to enter data through two buttons ok and cancel. - Input dialog () method is used to create dialog box. 2. **Conform dialog**: - It asks user about the confirmation of information. - Confirm dialog() method is used. 3. **Message dialog**: - It displays message some information to user - Show message dialog() method is used 4. **Option dialog**: - It is used to create dialog box according to users need. - showOptionDialog() method is used. **[Message type:]** 9. **[Panel:]** - It is a light weight container used for holding components which include JButton, JLabel, JList etc. - It is a create through JPanel component. - **[String paramstring():]** Returns a string representation of this panel. - [**AccessibleContentgetAccessibleContext():** gets the accessibleContentgetAssociatedwith the JPanel]. - **[voidadd(Component):]** Adds the specified component to the panel. - **[integetComponentCount():]** Gets the number of component in this panel. - **[void remove:]** Removes the specified component. 10. **[Scroll Pane:]** - A scroll pane is created through JScrollPane component. - It provides a scrollable view of a component. - It provides a way of scrolling horizontally and vertically if the widget becomes bigger than the view port size. - It is primary used in JTextArea, JList and JTable. 11. **[Password Field:]** - It is used to accept the password for an application during the execution of a program. - It is created through JPassword field component. - The text displayed is in the form of an echochar (eco character). The default character is. - It is used for security purpose and it demote show the character the user types. - **Back ground**: It is used to set the back colour for the password field. - **Font**: This control sets the font for the text of a password field. - **Foreground**: It is used to set the colour of the text to be display on password field. - **Text**: It is used to set the text for the password field. - **Echochar**: It is used to set an eco-character that is character to be display in the password field. **[Methods:]** - **[voidsetEchoChar(char):]** sets the echo character for the password field. - **[chargetEchoChar():]** this method returns echo character of the password field. - **[char\[\] getPassword:]** it returns the text displayed on the password field. - **[voidselectAll():]** selects all character of text field. **12**. **[Combo Box:]** - This let the user choose of several choices. - It has 2 forms--- 1. **Uneditablecombobox:** It features a button and a drop-down unit of values. 2. **Editablecombobox:** It features a text box with a button - User can type the value in the text field and click the button to displaying a drop-down list. - It is create through JComboBox component. **[Properties:]** 1. **Background: it is used to set background colour of the combo box.** 2. **ButtonGroup: I**t sets the group of buttons in which the correct control belongs**.** 3. **Editable: it is used to edit the contents of the textfield of the combobox.** 4. **Enabled: It is used to set the combobox as activated and deactivated on the runtime.** 5. **Font: It is used to sent a font style for the text to be displayed.** 6. **Foreground: It is used to foreground colour of the text to be displayed.** 7. **Mood:** specifics the data model of the combo box. 8. **Selected index:** this property is used to get or set the index specifying the correctly selected item. 9. **Selected them:** this property is used to get or set correctly selected item in the combo box. 10. **Text: It is used to specify the text to be displayed on the textfield.** **[Methods:]** 1. **Object getSelectedItem:** it returns currently selected list of jest from the data model. 2. **int getSelectedIndex:** it returns an integer specifying the currently selected list data. **0:** specifices first them in the list **1:** if no even is selected or if the currently selected item Is not in the list 3. **voidsetModel(ComboBoxModel):** it sets the data model that the JComboBox user to obtain the list of items. **13**. **[List:]** - It displays list of objects and allows user to selected one or more items. - It is created through JList component. - Due to many items in list they are put in scroll pare. - List allows selecting more than one at a time. - Combo box allows selecting only one them at a time. **[Properties:]** - **Background: It is used to set the background colour of the text field.** - **Model:** sets an associated object that stores - **SelectedIndex:** used to select an item initially default value is -1 (no item selected) - **Editable: This is used to edit the content of text field. If it is set to true then the text available in the text field can be edited by the user at run time.** - **Enabled: it is used to set the text field as activated and deactivated.** - **Font: This is used to set a fond type for the text to be displayed in the text field.** - **Foreground: This is used to set the foreground colour of the text to be display in the text field.** - **Text: This is used to specify the text to be display in the text field.** - **SelectedItem:** returns the selected item from the list. **Methods:** - **Object getSelectedvalue(): I**t returns the selected call index when only one item is selected. If no items selected then it will return null. - **Object getSelectedvalues(): I**t returns all selected raw in the form of an array from the list. **[Basic component handling methods:]** Several methods by which the various properties of components can be handled and modified are--- **Some of the methods are as follows in** 1. **[setText(): ]** - This method is used to set the text of component (button, label, text field, text area, check box) at run time. 2. **[getText():]** - This method is used to pitch out or retire the text contacted by the specified component (button label, text field, text area, check box etc.) at run time. 3. **[isSelected(): ]** - It gets the current state of component. - It is in the form of true or face. 4. **[setSelected():]** - used to set the current state of the component as selected or unselected. 1. Events---it is change of state of an object. 2. Event source---it is an object that generates an event. 3. Listener---it listens to the event it gets roughed when an event occurred. Events are supported by no of java package is like java. Otil java. A lot and java.awt.event. **[DEVELOPING GENERAL APPLICATION:]** **[Creating A New Project:]** **To create a new application project called "Java Application 1"** 1. **Choose File → New Project. Alternately, click the New Project icon in the toolbar.** 2. **From the Categories pane select Java and in the Projects pane, choose Java Application.→ Click Next.** 3. **Enter a name (in this case Java Application 1) in the Project Name field and specify the project location by clicking on the Browse button. By default, thee project is saved in the NetBeans Projects folder in My Documents and so this is the default Project location displayed in this field.** 4. **Ensure that the Set as Main Project checkbox is selected and clear the Create Main Class field.** 5. **Click Finish.** **[Creating a new Form:]** **To creating a JFrame Form container:** 1. **In the Projects window, right-click the Book node and choose New → JFrame Form as shown in Figure.** 2. **Enter Form Example 1 as the Class Name. This will be the name of your form.** 3. **Enter Book as the package. This should be the name given while creating the Project.** 4. **Click Finish.** **[Adding a Button Component to a Form:]** **We want to add a button so follow the given steps to add a JButton to the form:** 1. **In the Palette window, select the JButton component from the Swing Controls category.** 2. **Move the cursor over the Form. When the guidelines appear (as displayed in Figure) indicating that the JButton is positioned in the desired location, click to place the button.** **[Executing a File:]** **Step 1: Create a new Project** **Step 2: Add a JFrame form** **Step 3: Add the desired component form the Palette window using drag and drop feature.** **Step 4: Associate code with the component by double clicking the component.** **Step 5: Add the source code.** **Step 6: Test the form by pressing Shift + F6** **[Note:] In Non-GUI methods, to run the program press F6 key from the key board and for GUI method, to run the program press Shift + F6 key board.** **[PROGRAMMING FUNDAMENTALS]** 1. **[CHARACTER SET]:** - A character set is a set of textual and graphic symbols. - Java uses Unicode character set. - It defines standardized, universal character set used for representing characters and symbols as integers. - It uses 16-bits i.e. it can represent more than 65000 unique characters. 2. **[Java tokens:]** - It is the smallest element of program. - It includes: keywords, identifiers, literals, punctuators, operators etc. 3. **[Keywords:]** - There are 50 reserve keywords in java programming language. - ![](media/image38.png) 4. **[Identifier:]** - These are the variables used in java programming. - An identifier is a name of fundamental building blocks of a program such as class, object, interface etc. **[Rules to define a java identifier:]** - Identifiers can contain alphabets, digits, underscore or dollar sign character. - They must not begin with a digit. - It contains upper case and lower case. - They cannot be a keyword, Boolean letters or null character. 5. **[Literals:]** - Literals are those data items whose value does not change during the program execution. - These are also known as constants. The type of literals in java is: - Integer literals - Character literals - Floating point literals - Boolean literals - String literals - Null literals a. **[Integer literals:]** These primary literals used in java are divided into 3 types: - Decimal integer literals:- 0 to 9 - Hexadecimal integer literals:- 0 to 9, A to F. - Octal integer literals:-0 to 7 b. **[Character literals:]** - It represents a single Unicode character and appear within a pair of single quotations marks. - Some characters' are not printable through keyboard such as back space, tabs, so these characters are represents using escape such as - ![](media/image40.png)Enclosed with in single quotes' c. **[Floating point literals:]** Floating point literals can be donated as a decimal point, an fraction part and an exponent. d. **[Boolean]** **[literals:]** There are two Boolean literals' true or false 1---true 0---false e. **[String literals:]** It is sequence of characters between pair of double quotes. Ex---"Hello Java" "result =0.01" f. **[Null literals:]** - It represents null value '\\0'. - It is specified as null it means the end of string. **[Punctuators\-- (separates)]** - It is a type of token that has synthetic and semantic meaning. - It is used for grouping and separating the numeric and non-numeric data. \(2) Used to separate statement Used as special character. **[Operators]** Operators are those tokens that perform a specific tasks/ computation when applied on variable or some objects in an expression. They are \-\-- - Arithmetic operators - Logical operators - Relational operators - Assignment operators - Conditional operators - Increment and decrement operators - Bitwise operators 1. **[Arithmetic operators:]** These operates are used in mathematical expressions. Those operators can operate on built-in data types of java. Lets A=5, B=10 ![](media/image43.png) 2. **[Relational operator:]** Relational operators compare two operands to one another. The relational operators are =, \, \=. When used in an expression, they all return a Boolean value which states the result of comparison**. Relational operator are sometimes called comparison operators.** Lets A=10, B=15 3. **[Logical operators:]** These operators are used to make a decision on two conditions. Logical operators are typically used with Boolean values and what they return is also a Boolean value. Logical operators are mainly used to control program flow. Lets A=5, B=7, C=9 ![](media/image45.png) 4. **[Conditional Operator:]** Conditional operator is used when one expression and two statements are given, it is a ternary operator. The syntax of this operator is like, Syntax: expl ? exp2 : exp3; Where exp1 is an expression and exp2 and exp2 are statements. **For example:** a==3; b=4; c= (a\ - Numeric - Floating point type - Character type - Boolean type 1. **[Numeric data type:]** - These store only integer values. They are of four parts: I. **[Byte]:** - It is smallest numeric data type. - It uses 8 bits to represent a number - It has range value -128 to 127 - It is of **1 byte** II. **[Short]:** - It has small range of values ranging from -32768 to 32767 - It uses **2 bytes** to represent a number. III. **[Int]:** - It is commonly used 32-bit signed integer range from -2147483648 to +2147483647 - It is of **4 bytes**. IV. **[Long:]** - It is a 64-bit signed integer having a wide range of values. - It is of **8 bytes**. 2. **[Fractional / Floating data type(numeric])** - Data types which stores fractional numbers are known as floating data type. - The other name of these data type is known as floating point data types. - They are of two types of - Float - Double **[Float:]** - It holds floating point numbers of 32 bit. - It has +ve or-ve sign. It has greater range of integers ranging from +ve to --ve. - It is of **4 bytes** ranging from -3.4×10 ^38^ to 3.4×10 ^38^ - It is of **8 digits precision** (no of digits allowed after decimal). **[Double]:** - It is extended version of float data type. - It couples doubles memory with larger range i.e **8 bytes.** - It is of **15 digits precision** and ranges from -1.7×10 ^308^ to 1.7×10 ^308^ - **[Example of double]**-complex math function such as sin (), sqrt() etc. 3. **[Character data type (Non-numeric)]** - The data type is of **2 types** which store in code characters**.** - These characters are stored in bring from as integers. - These characters are assigned a particular value according to ASCII code. - Only java supports Unicode characters. It represents all languages of world. - It is of 16- bits and venues from 0 to 65535. - It uses char keyword. 4. **[Boolean data type (Non-numeric)]** - It is used to represent logical value. - It tests a particular condition i.e. true or false. - It reserves 8-bit i.e **1 byte** storage space but it uses only 1-bit. - They are made from Non-Primitive data types. - They are defined by the programmer according to the requirement of programmers. - Ex -- classes, arrays, interface. - It stores memory address of an object. - It is a collection of fixed size finite numbers of objects and values that belong to same data type. - It is a collection of data storage locations. - Class is collection of objects. It is user defined data type. **[Interface:]** - It is group of methods to provide basic functionality to classes to share common behavior. **[Difference between Primitive and Non-primitive data type:]** **[Primitive]:** - These are built-in data types. - There are 8 primitive data types provided by java. - These types are handled value. **[Non-primitive data type]:** - They are user defined data types. - The non-primitive data types in java are objects and arrays. - These types are handled by reference. **[String in java]:** - They are the sequence of characters. - String can be declared and created as follows: String name; (or) String name= new String ("string"); For ex-a string "information technology" is declared below String STR; STR =new string ("information technology"); **[Variable:]** - It is the name of location where the information is stored. - It is an identifier which holds data or another one. - It is an identifier whose value can be changed at the exaction of program. **[Declaring a variable:]** - All variables must be declared before they are used in java program. - It is declared by providing the data type of a variable. **[Variable naming:]** It defines a set of rules and regulations to decide the name of variable. **[Rules to name a variable]:** - Variable name are case-sensitive. - No spacing is allowed with in variable names. - No special symbol can be used in variable names such as !, 0, \#, & etc. - A variable name cannot start with numeric value or underscore (\_) symbol. - A variable name must not be a keyword or reserved word. - Every variable name should start with an alphabet. **[Assigning values to variables:]** - Value is assigned to a variable after it is declared. - Assigning a value to a variable is known as initialization of variable. - To initialization a variable we use an assignment operator. **[General from of initialization (declaring variable)]** **Note:** char values are whether single quotation marks but not the numeric values. **[Constant in java:]** - Those values which never get changed. - Day have 24 hours, the value of pi will always 3.141. - While programming these values remain in same way these variables are known as constant. - Constant are always declared by final keyword because final is a reserved keyword which the compiler that the value will remain unchanged. **Note :** It is declared only once in the program. **[Structure of program]** Package detail import java.io.\*; Class class name class my class { Data members int a, b, c; User defined methods void display () Public static void main (string args\[\]) { Block of statements; System.out.println ("hello java"); } } - A package is a collection of classes, interfaces and sub packages. - A sub package contains collection of classes, interfaces and sub-sub packages. - Class is a key word used for developing user defined data type. - "class name " represent a java valid variable name of the class - User defined methods represents which are meant for performing the operations either once or each and every time. - Each and every java program starts execution from main () method and main method () is known as program driver. - Main () method of java doesn't return any value and hence its return type is void. - Main () method is must be all used by every java programmer so that access specifier must be public. - Block of statements represents set of executable statement which are called user-defined methods. - The file naming conversion in java programming is that whichever class is containing main() method that class name must be given as a file name with an extension.java **[Main () method]** - Main () is string execution block of a java program. - Java program start their execution from main method. - If any class contain main () method of is known as main class. **Syntax-** Public static void main (String arg\[\]) { \-\-\-\-\-\-\-\-\-\--; \-\-\-\-\-\-\-\-\-\-\--; } **[public:]** It is a keyword if it is produced by main () method, the scope is available anywhere it means main () method can be executed from anywhere. **[static:]** It is a keyword if tit is preceded by any class properties for that memory is allocated only once in the program. **[void:]** It has no return type, if preceded by main () method it will never return any