Course Content
Core Java
About Lesson

A PROGRAM is a set of instructions or commands written in a programming language that directs a computer to perform specific tasks or achieve certain goals.
It is a sequence of steps or algorithms designed to solve a problem, automate a task, or control the behavior of a system.

Lets understand with some real life example:

Suppose you have Cafe serving Pizza/Burger. Manager takes order, Gives to Chef, Chef prepare food, Waiter serves it.

Lets understand this in the world of Computer Programs, how this would happen.

  1. Manager would note down orders with the items like Pizza Type +Base + Toppings + Spicy/Extra Spicy, Onion, etc.
  2. Here manager is the programmer which writes code i.e order with all the instructions on how the Burger/Pizza should be. Code should have all the details of the items being prepared according to the customer requirement.
  3. Now manager has written the code from its understanding, but there should be something that should understand the Manager’s code and provide standard instructions. This standard instructions are understandable by all the chefs of the world so this should be uniform. This work of understanding Manager code is done by COMPILER which translates Manager code to standard instructions.
  4. What Compiler should do? Search for errors. Make sure proper standards are followed. Eg, Manager can’t write put Lemon Juice in Pizza, etc. If any errors are there in Manager code, compiler should tell it to fix them.
  5. Once Manager code is error free, Compiler converts it to standard code/instructions. Now comes the Execution.
  6. Translated code is now executed in the Chef Kitchen. Chef Kitchen reads the compiled instructions and make the pizzas as present in the code. It executes each step as mentioned in the translated code.

So your Job is of a Manager where you understand and collect the customer’s requirements and then write the Code.

Components of a Program:

  • Input: Programs may take input from various sources, such as user input, files, sensors, or other systems.
  • Processing: Programs manipulate the input data according to predefined algorithms or logic to produce the desired output.
  • Output: Programs generate output, which can be in the form of display on a screen, writing to a file, sending data over a network, or controlling external devices.

Programming Languages:

  • Programs are written using programming languages, which provide a set of syntax rules and constructs for expressing algorithms and instructions.
  • Programming languages can be classified into high-level languages (e.g., Java, Python, C++) and low-level languages (e.g., assembly language, machine code).

Scroll to Top