Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Northern Virginia EGR 126: COMPUTER PROGRAMMING FOR ENGINEERS PROJECT 1 (Chapters 1-4) The completed Assignment must be submitted via Blackboard Document name must be LastName

image text in transcribedimage text in transcribed

Northern Virginia EGR 126: COMPUTER PROGRAMMING FOR ENGINEERS PROJECT 1 (Chapters 1-4) The completed Assignment must be submitted via Blackboard Document name must be LastName P1.cpp . Your code must be saved as C++ file. The source code file must contain a file header formatted as specified below. The header information must be complete and accurate. The source code file should use self-documenting code and additional comments (as required) to improve code readability SOURCE FILE HEADER // EGR 126 ELI Spring 2018 /I Student Name: Firstname LASTNAME (last name must be in capitals) // Assignment: // Submission Date: // System: The operating system and IDE information // Purpose: Explain what this program does and if there are any limitations or constraints REFORESTATION PROGRAM You will develop a program for timber regrowth management. Timber management requires a calculation of how much timber to leave uncut each year so that the harvested area is reforested according to resource conservation guidelines Inputs to the problem are: . name of the forest . total desired reforestation area . amount of timber unharvested at the start of the plan . reforestation rate (expressed as a decimal), which depends on variables such as climate Example 100 acres are left uncut in the initial period The reforestation rate is 0.05 (or 596) The number of acres forested (uncut) at the end of year is end of year calculate number of acres forested 100+100 0.05 105+105 0.05 result 105.00 10.25 20 252.70+252.70 0.05 265.33 USER INPUTS (a) Forest name (one word) See chapter 2 page 46 for string data example (b) Total acreage (desired reforestation area) (c) Number of acres uncut at beginning of period (d) Reforestation rate (a decimal number or percentage such as 0.05 or 5%) MENU OPTIONS Three menu options including Exit: . Option 1. Forestation table (exactly 30 years) 2. Option 2. Reforestation calculator 3. Exit Program Requirements .Output must re-display user inputs (forest name, acreage, initial uncut acres, and reforestation rate) . Forestation table will have 2 columns and must display the year and the number of acres forested at the end of years 1 30 (similar to the example) Forestation calculator displays the number of years required for the given total acreage to be reforested. It wll not display a table, only the result with suitable text. . User must be offered the option to exit . If user enters an invalid menu choice, the program must give the user the warning message "Invalid entry!" and present the menu again TERMINATION Program will NOT stop until user selects option 3 (Exit) NOTE 1: Follow the instructions strictly and do not add additional cases into the program. Using advanced features of C++ is not permitted, and your assignment may be rejected for grading, which will result in a grade of zero NOTE 2: Must provide complete and accurate program file header NOTE 3: You MUST follow the required naming format. Do NOT name your file main.cpp". NOTE 4: The user interface (which appears on the black console screen) must have the same three menu choices as described in the requirements. NOTE 5: Test your program rigorously to make sure that it performs correctly for a variety of situations. The instructor is not going to test it for you. Once you submit the assignment, there are no do-overs. Please make sure your program works correctly. A program that produces severely flawed output will be graded down considerably, not because the program is flawed, but because you did not test it adequately to detect serious and obvious problems! Northern Virginia EGR 126: COMPUTER PROGRAMMING FOR ENGINEERS PROJECT 1 (Chapters 1-4) The completed Assignment must be submitted via Blackboard Document name must be LastName P1.cpp . Your code must be saved as C++ file. The source code file must contain a file header formatted as specified below. The header information must be complete and accurate. The source code file should use self-documenting code and additional comments (as required) to improve code readability SOURCE FILE HEADER // EGR 126 ELI Spring 2018 /I Student Name: Firstname LASTNAME (last name must be in capitals) // Assignment: // Submission Date: // System: The operating system and IDE information // Purpose: Explain what this program does and if there are any limitations or constraints REFORESTATION PROGRAM You will develop a program for timber regrowth management. Timber management requires a calculation of how much timber to leave uncut each year so that the harvested area is reforested according to resource conservation guidelines Inputs to the problem are: . name of the forest . total desired reforestation area . amount of timber unharvested at the start of the plan . reforestation rate (expressed as a decimal), which depends on variables such as climate Example 100 acres are left uncut in the initial period The reforestation rate is 0.05 (or 596) The number of acres forested (uncut) at the end of year is end of year calculate number of acres forested 100+100 0.05 105+105 0.05 result 105.00 10.25 20 252.70+252.70 0.05 265.33 USER INPUTS (a) Forest name (one word) See chapter 2 page 46 for string data example (b) Total acreage (desired reforestation area) (c) Number of acres uncut at beginning of period (d) Reforestation rate (a decimal number or percentage such as 0.05 or 5%) MENU OPTIONS Three menu options including Exit: . Option 1. Forestation table (exactly 30 years) 2. Option 2. Reforestation calculator 3. Exit Program Requirements .Output must re-display user inputs (forest name, acreage, initial uncut acres, and reforestation rate) . Forestation table will have 2 columns and must display the year and the number of acres forested at the end of years 1 30 (similar to the example) Forestation calculator displays the number of years required for the given total acreage to be reforested. It wll not display a table, only the result with suitable text. . User must be offered the option to exit . If user enters an invalid menu choice, the program must give the user the warning message "Invalid entry!" and present the menu again TERMINATION Program will NOT stop until user selects option 3 (Exit) NOTE 1: Follow the instructions strictly and do not add additional cases into the program. Using advanced features of C++ is not permitted, and your assignment may be rejected for grading, which will result in a grade of zero NOTE 2: Must provide complete and accurate program file header NOTE 3: You MUST follow the required naming format. Do NOT name your file main.cpp". NOTE 4: The user interface (which appears on the black console screen) must have the same three menu choices as described in the requirements. NOTE 5: Test your program rigorously to make sure that it performs correctly for a variety of situations. The instructor is not going to test it for you. Once you submit the assignment, there are no do-overs. Please make sure your program works correctly. A program that produces severely flawed output will be graded down considerably, not because the program is flawed, but because you did not test it adequately to detect serious and obvious problems

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Outline three future developments in financial reporting.

Answered: 1 week ago

Question

4 What is the recruitment phase?

Answered: 1 week ago