Activity

Ready to Launch

Overview
Grades 5-8
60 min
Topics
Computer Science
Status

By the end of this activity, you will learn the definition of decomposition in computer science, how to break down regular objects into small parts, and the importance of simplifying complex problems through decomposition.

Decomposition means breaking big problems down into smaller, easier parts. When programmers decompose code, they make the code easier to read and reuse.  From household items to rockets to code, anything can be decoded!


Everyday items in your home

Paper

Pencil

Phillips head screwdriver

Flathead screwdriver


1
Decomposition

Decomposition means breaking big problems down into smaller, easier parts.

In making a rocket, hat means thinking about building the individual pieces of the rocket, like the seat or the windshield, instead of just thinking about building a whole rocket. When programmers decompose code, they make the code easier to read and reuse.

Did you know?

Decomposing simplifies writing code because coders don’t have to think about the whole program at once.  Instead of thinking “make a video game,” coders start smaller by thinking of how to do something like “make the character walk.”

Today, we’ll do some decomposing of our own. Ask your family members if they have an item around the house that is broken. Ideally, it should be something that requires electricity. Examples include an old computer, hair dryer, toaster, TV, radio, printer, or lamp.

We want to work with something that uses electricity as those items are more complex and have several parts.  Since this item is broken, ask your family member if you can decompose it and take it apart.  We want to see all the parts that make up that item.

Safety first! Even if the item is broken make sure it is unplugged before you do any decomposing. 

Debugging

Were you able to figure out why the broken item is not working anymore? When code does not work, we have to find out where it is broken. This is called debugging. Debugging is the act of looking at where the code works and identifying the line of code where it stops working. By debugging the code, coders are looking for the errors and fixing them.

2
Decomposing Code

Just like decomposing a lamp, code can be decomposed, too!

Did you know?

An assembly line is a set of machines, equipment, and workers that all work together to create an object. Usually, the object is assembled as it moves through the assembly line, having pieces added to it until the object is completely assembled.

The first manufacturing assembly line was created by Henry Ford in 1913. He introduced the concept of a moving assembly line in Michigan. This revolutionized the production process for automobiles, enabling the efficient, rapid assembly of individual components into finished vehicles.

So how is decomposing code like an assembly line?

  • Division of Work: Like an assembly line divides tasks among different workers, decomposition divides a big problem into smaller tasks that different parts of the code or different programmers can handle. Programmers often work together on a computer program versus writing it all by themselves. They become experts at their part of the code.
  • Specialization: Assembly line workers specialize in specific tasks. For example in the automotive industry, some employees specialize on the engine, while others might install the seats or tires. Similarly, when decomposing code, each part or function focuses on doing a specific task well, allowing for specialization and expertise in that area.
  • Efficiency: An assembly line maximizes efficiency by letting multiple tasks happen at the same time. Decomposition achieves something similar, enabling multiple people to work on the same computer program. Different parts of the code can be worked on simultaneously by different programmers, making the development process faster.
3
Rocket Launch

Rockets are complex objects that require a lot of parts and information to function. Let’s think about the type of items needed to make a rocket work.  Since it is a big project, let’s use four main buckets to think about the needed parts.

  1. The exterior (or outside) of the rocket
  2. The interior (or inside) of the rocket where the people travel
  3. The launchpad
  4. The control module on Earth

For the next part of this activity, think about big items that would go in each bucket. For example, a rocket is going to have a lot of screws, but for now, let’s just focus on big items. Here is an example of a big item that belongs in each bucket.

Now it is your turn. Take your pencil and draw lines to divide your paper into four columns, one for each of the four buckets we just discussed. Your paper may look something like this.

What big items can you come up with?  Write them down or draw them on your paper in the correct column. If you’d like, you can even draw a quick sketch of your rocket design!

Share It!

Show your list to a family member or a friend.  Can they think of other big items that belong in each bucket?  Working as a team allows new ideas to be added to the complex problem. Designing a rocket does not happen overnight. Even if you have a full list of all the parts and components for your rocket, it still would not happen in a day.  It may take several years of planning and design to make it happen.

Did you know?

Is your rocket design unique?  Did you come up with a new design that has never been seen before?  Any time we come up with a new product or program, we want to protect it so that someone else does not take our idea and build it before we can. To prevent this, we can file a patent.

A patent is a legal document granted by a government to an inventor, providing exclusive rights to the inventor over their invention for a limited period of time. It is a form of protection that grants the inventor the right to prevent others from making, using, selling, or importing their invention or idea without permission.

1

What surprised you as you decomposed the household item?

2

What is an idea you have for a new computer game or program?  Do you think your idea is different enough from other programs out there?

3

Why is it important to work with others or ask for help when trying to solve complex problems?

Think of a computer game you might like to create.  Brainstorm keywords and then research the patent site to see if someone else has already filed a similar patent.  Research allows you to see existing ideas. It also saves you time so you don’t develop a similar product if someone else has already filed a patent. Explore the patent website to see if your ideas are original.


There are careers that protect people’s intellectual property. Intellectual property are ideas and creations, like inventions, art, and designs. Just like laws giving rights to owners of physical property, intellectual property laws give people or groups special rights for their creations. These rights let creators control how their work is used and make money from it.

For example, patent examiners work for government patent offices and are responsible for reviewing patent applications. They assess the patentability of inventions by conducting thorough examinations of the applications, reviewing prior art, and determining if the invention meets the requirements for patent protection.

Did you enjoy this activity?

No endorsement by 4-H is implied or intended. 4-H is the youth development program for our nation’s cooperative extension system.