0% found this document useful (0 votes)
0 views2 pages

CMP 201 Assignment

The document outlines the differences between strongly typed and weakly typed programming languages, emphasizing type checking mechanisms and examples of each. It also provides an extensive overview of object-oriented programming, detailing its key principles, concepts, and benefits. Lastly, it compares C and Python programming languages, highlighting their compilation methods, memory management, syntax differences, and typical use cases.

Uploaded by

feranmiphillp024
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)
0 views2 pages

CMP 201 Assignment

The document outlines the differences between strongly typed and weakly typed programming languages, emphasizing type checking mechanisms and examples of each. It also provides an extensive overview of object-oriented programming, detailing its key principles, concepts, and benefits. Lastly, it compares C and Python programming languages, highlighting their compilation methods, memory management, syntax differences, and typical use cases.

Uploaded by

feranmiphillp024
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/ 2

NAME: ADESIDA OLUWAFERANMI PHILLP

DEPARTMENT: COMPUTER SCIENCE


LEVEL: 200 LVL
COURSE: CMP 201
ASSIGNMENT

1) Differentiate between strongly typed and weakly typed languages.

(2) Write extensively on object-oriented programming.

(3) Clearly differentiate between c and python programming languages.

(1) Strongly Typed and Weakly Typed Languages

Programming languages can be categorized as strongly typed or weakly typed based on their type
checking mechanisms.

Strongly Typed Languages:

- Check variable types at compile-time.

- Ensure type safety and prevent type errors.

- Require explicit type definitions.

- Examples: Java, C++, C#, Go.

Weakly Typed Languages:

- Check variable types at runtime.

- Allow implicit type conversions.

- Do not require explicit type definitions.

- Examples: JavaScript, Python, Ruby, PHP.

(2) Object-Oriented Programming (OOP)

OOP is a programming paradigm that organizes software design around objects and their interactions.

Key Principles:

1. Encapsulation: Hide internal implementation details.

2. Abstraction: Expose only necessary information.

3. Inheritance: Create new classes based on existing ones.

4. Polymorphism: Objects can take multiple forms.

5. Composition: Objects contain other objects.

OOP Concepts:

1. Classes and Objects

2. Methods and Properties

3. Constructors and Destructors


4. Inheritance and Polymorphism

5. Interfaces and Abstract Classes

Benefits:

1. Modularity

2. Reusability

3. Easier Maintenance

4. Improved Readability

(3) C and Python Programming Languages

C:

1. Low-level, compiled language.

2. General-purpose programming.

3. Efficient performance.

4. Manual memory management.

5. Verbose syntax.

Python:

1. High-level, interpreted language.

2. Scripting and rapid development.

3. Easy-to-learn syntax.

4. Automatic memory management.

5. Extensive libraries.

KEY DIFFERENCES:

1. Compilation: C is compiled, while Python is interpreted.

2. Memory Management: C requires manual memory management, whereas Python uses automatic
memory management.

3. Syntax: C has a more verbose syntax compared to Python's concise syntax.

4. Use Cases: C is suitable for systems programming, embedded systems, and performance-critical
applications. Python excels in web development, data analysis, machine learning, and scripting.

You might also like