The Benefits of Recycling
Recycling of materials provides a significant number of benefits for the environment and is critical for a sustainable society. This is especially important as the amount of municipal solid waste is quite large – i.e. the amount of trash we are producing. As of 2009, only about one-third of this waste was actually recycled or otherwise “recovered” before ending up in a landfill. Recycling not only keeps materials out of landfills, but also promote efficient energy usage, clear air, and clean water supplies.
Consider the following materials and the facts about recycling:
Material | Notes and Benefits |
---|---|
Aluminum Cans |
|
Plastic Bottles |
|
Glass Bottles |
|
Paper Towels |
|
Recycling can also provide economic benefits to a variety of industries. An example of the economic and environmental benefits of recycling scrap metal can be seen in the following video:
Suppose we wanted to write an interactive program whereby people could learn some simple benefits of recycling. Such a program may be useful for conditional selection constructs.
C++ Project: Displaying Recycling Benefits
This project will provide you with an introduction to the fundamentals of multi-way conditional selection in C++. The focus of this project is on how to solve problems using the C++ “cascading if” statement. In this project, you will…
- Develop code to read data from the standard input and produce data to the standard output.
- Write code that conforms to a programming style specified by the instructor.
- Select and implement the appropriate control structure(s) for this problem.
As always, be sure to properly document your code. Consult the C++ Coding Guidelines document for proper coding standards. Use good design principles and design the solution before attempting to write code.
Create a program called Recycling.cpp.
This program will give the user a four-choice menu, as follows:
MATERIAL SELECTION MENU (1) Aluminum Cans (2) Plastic Bottles (3) Glass Bottles (4) Paper Towels Which number do you choose? |
Once the user has made a selection, echo-print the selection to the user with a descriptive message. Next, provide the user with messages describing the recycling benefits of their chosen material. For example, if the user chooses (3) Glass Bottles, they should see the following output:
You chose (3) Glass Bottles. Did you know that glass bottles take 1 million years to biodegrade, and that recycling 1 bottle saves enough energy to power a 100-watt bulb for four hours? |
Use a cascading if
statement in your logic.
Deliverables
See the instructor for submission instructions and due date(s).