Program Modularization in High-level Languages

Instructor: David Gloag
In this lesson, we will define program and program modules, and look at how program modules are invoked. We will also define a library in terms of computer programming and discuss how it relates to a program.

The Impact of Computers

In a technology-based society like ours, computers affect many aspects of our lives. They are behind the weather reports we consume, they influence the tasks we perform at work. With the near ubiquitousness of smartphones, we even carry them around in our pockets or purses. Some would go so far as to say they impact almost every aspect of our life. But if they are so far reaching, how do we control them? How do we make them do the specific things we want we want them to do? A few different methods have been tried over years, each with varying success. But the one that has proven to be successful is the concept of a program.

What is a Program?

A program is a series of statements or commands. The series is executed by a computer system to perform some meaningful task. Some programs are very small, requiring only a few statements. Others are rather large, made up of hundreds or thousands of statements. No matter the size, programs provide a computer with an essential piece of the puzzle, the instructions needed to perform the indicated task. For example, developers at Microsoft created a program called Word that provides word processing capabilities. And they're not alone. Developers at Apple, Amazon, and even Walmart are hard at work creating their own programs designed to help their employees and customers.

What is a Program Module?

A program module is a high-level language construct, typically part of a program, that groups a series of statements together that perform a related task so that they can be accessed as a single entity. A high-level language is a computer programming language where each command translates to several machine language commands. Program modules generally take one of two forms:

  • Sub-Programs - These are also known as functions, procedures, modules, subroutines, and routines. These entities can be invoked by name, without repeating the statements that make them up. This also speeds up development, reduces errors, and increases reuse.
  • Objects - These are complex entities that group together one or more sub-programs with the information those subprograms manipulate. Think of an object like a self-contained unit. They have similar advantages to subprograms.

These entities above have a couple of features worth noting. They include:

  • Local Variables - This is a labeled memory allocation that has a local scope, meaning that it is only visible within the program module in which it is defined. This is in contrast to a global variable which can be seen anywhere in a program.
  • Parameters - This is a piece of information that can be passed in or out of a sub-program or object. Passing is done by value, where a copy is made and updated by the entity, or by reference, where the address is used and the actual value can be updated.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account