0% found this document useful (0 votes)
2 views8 pages

What is a Programming Language

programming language types

Uploaded by

aswini.ran98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

What is a Programming Language

programming language types

Uploaded by

aswini.ran98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

What is a Programming Language?

A programming language is a way for humans to communicate with computers.


It is used to write instructions (code) that a computer can understand and execute.

🧭 Types of Programming Languages


🔹 1. Low-Level Languages

 Closer to machine language (binary).


 Very fast but hard to write and read.
 Examples:
o Machine Language (binary code)
o Assembly Language

🔹 2. High-Level Languages

 Easy to read and write (more like English).


 Used for general-purpose programming.
 Examples:
o Java
o Python
o C++
o JavaScript
o C#
o Ruby

🔹 3. Scripting Languages

 Used for automating tasks.


 Often interpreted, not compiled.
 Examples:
o Python
o JavaScript
o PHP
o Bash

🔹 4. Domain-Specific Languages

 Designed for specific tasks.


 Examples:
o SQL (for databases)
o HTML/CSS (for web design)
o MATLAB (for mathematics/engineering)
📋 Popular Programming Languages and Their Uses
Language Use Case
Python AI, Data Science, Web Apps
Java Android Apps, Web, Enterprise
C Systems, Embedded Programming
C++ Game Development, Performance
JavaScript Web Development (Frontend + Backend)
C# Windows Apps, Game Dev (Unity)
PHP Web Servers, Backend
Go System tools, Cloud services
Swift iOS App Development
R Data Analysis, Statistics

🧠 Why Learn Programming Languages?


 Build websites, apps, games, and software.
 Automate boring tasks.
 Create AI and machine learning systems.
 Start a tech career.

📊 Types of Programming Languages – Comparison Table

Type Level Features Examples Used For


Machine Binary (0s and 1s), directly
Low-Level N/A CPU Instructions
Language understood by CPU
x86 Device drivers,
Assembly Uses mnemonics (MOV,
Low-Level Assembly, embedded
Language ADD), closer to hardware
ARM ASM systems
Code written as System software,
Procedural C, Pascal,
High-Level procedures/functions, step-by- embedded
Language Fortran
step instructions systems
Web, Apps,
Object- Based on classes and objects,
Java, C++, Games,
Oriented High-Level supports inheritance and
Python, C# Enterprise
Language encapsulation
Systems
Python, Web,
Scripting Interpreted, fast development,
High-Level JavaScript, Automation,
Language automation
PHP Scripting tasks
Based on mathematical Data science, AI,
Functional Haskell, Lisp,
High-Level functions, avoids state and concurrent
Language Scala
mutable data systems
Logic-Based Uses logic and facts to derive AI, Expert
High-Level Prolog
Language results Systems
Markup Not a true Used to define structure and HTML, Web pages, data
Language language presentation of data XML, LaTeX formatting
Type Level Features Examples Used For
Domain-
SQL,
Specific Designed for a specific Databases, Math,
Specialized MATLAB,
Language problem domain Hardware design
Verilog
(DSL)

🔑 Key Differences Summary:

 Level: Low-level is hardware-near (fast but complex), High-level is human-friendly.


 Execution: Low-level is compiled; scripting languages are usually interpreted.
 Abstraction: Higher abstraction means easier code writing and maintenance.
 Usage: Different types suit different application areas like system programming, web,
AI, etc.

🧠 Basic Concepts of OOPs (Object-Oriented Programming)


Object-Oriented Programming (OOP) is a programming model based on objects and classes,
designed to organize and manage complex programs more efficiently.

🔑 1. Class

 A class is a blueprint or template for creating objects.


 It defines properties (variables) and behaviors (methods).

📘 Example:

java
CopyEdit
class Car {
String color;
void drive() {
System.out.println("Car is driving");
}
}

🔑 2. Object

 An object is an instance of a class.


 It represents a real-world entity with state and behavior.

📘 Example:

java
CopyEdit
Car myCar = new Car();
myCar.color = "Red";
myCar.drive();
🔑 3. Encapsulation

 Encapsulation means wrapping data and code together in a single unit.


 It protects data by making variables private and accessing them via getters/setters.

📘 Example:

java
CopyEdit
class Student {
private int age;

public void setAge(int a) {


age = a;
}

public int getAge() {


return age;
}
}

🔑 4. Inheritance

 Inheritance allows one class to acquire the properties and behaviors of another
class.
 Promotes code reuse.

📘 Example:

java
CopyEdit
class Animal {
void sound() {
System.out.println("Animal makes sound");
}
}

class Dog extends Animal {


void bark() {
System.out.println("Dog barks");
}
}

🔑 5. Polymorphism

 Polymorphism means one name, many forms.


 Allows a method to perform different tasks based on the object or parameters.

📘 Types:
 Compile-time (Method Overloading)

java
CopyEdit
void display(int a);
void display(String b);

 Run-time (Method Overriding)

java
CopyEdit
class Animal {
void sound() {
System.out.println("Animal sound");
}
}
class Dog extends Animal {
void sound() {
System.out.println("Dog barks");
}
}

🔑 6. Abstraction

 Abstraction means hiding internal details and showing only essential features.
 Achieved using abstract classes and interfaces.

📘 Example:

java
CopyEdit
abstract class Shape {
abstract void draw();
}

class Circle extends Shape {


void draw() {
System.out.println("Drawing Circle");
}
}

🎯 Summary Table:
Concept Meaning Java Support

Class Blueprint of object class keyword

Object Instance of a class new keyword

Encapsulation Protects data using access modifiers private, get, set

Inheritance Reuse of code from one class to another extends keyword


Concept Meaning Java Support

Polymorphism Same name, different behavior Overloading, Overriding

Abstraction Hiding complexity, exposing only essentials abstract, interface

Would you like:

 This in Tamil?
 With real-world examples like bank, school, etc.?
 Or a PDF for class/notes?

Let me know!

You said:
what is oops?

ChatGPT said:

✅ What is OOPs (Object-Oriented Programming System)?

OOPs (Object-Oriented Programming) is a programming approach based on the concept


of “objects”, which represent real-world entities like a car, person, or bank account.

It allows you to organize code by grouping related data and functions together into objects.
This makes programs easier to understand, modify, reuse, and maintain.

🧠 Simple Definition:
OOP is a programming style that uses objects and classes to design and build applications.

💡 Key Features of OOP:


Feature Meaning

Class Blueprint or template to create objects

Object Instance of a class that has data (state) and methods (behavior)

Encapsulation Hiding internal details and protecting data


Feature Meaning

Inheritance One class can reuse code from another class

Polymorphism One method behaves differently depending on the object or parameters

Abstraction Showing only essential features and hiding the complexity

🔧 Why Use OOP?


 Makes code modular and reusable
 Easier to debug and maintain
 Reflects real-world modeling (e.g., Bank, Car, Student)
 Promotes code reusability through inheritance
 Allows flexibility and scalability in large applications

📘 Example in Real Life:


Imagine a class called Car:

java
CopyEdit
class Car {
String color;
void drive() {
System.out.println("Car is driving");
}
}

Now create an object:

java
CopyEdit
Car myCar = new Car();
myCar.color = "Red";
myCar.drive(); // Output: Car is driving

Here, myCar is an object of the class Car.

📘 Code Example (Class and Object)


java
CopyEdit
class Car {
String color;
void drive() {
System.out.println("Car is driving");
}
}

public class Main {


public static void main(String[] args) {
Car myCar = new Car(); // object creation
myCar.color = "Red";
myCar.drive();
}
}

🔷 Diagram: Class and Object Relationship


pgsql
CopyEdit
+----------------------+
| Class |
| Car (Blueprint) |
+----------------------+
| - color | <--- Properties (Fields)
| + drive() | <--- Method
+----------------------+
|
| Used to create object
v
+--------------------------+
| Object |
| myCar (Instance) |
+--------------------------+
| color = "Red" |
| can call: drive() |
+--------------------------+

🧠 Explanation:

 Car is a class – it defines what a car is (like a template).


 myCar is an object – an actual car with real data (color = Red).
 You can create many objects from the same class with different values.

You might also like