Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

2 Dimensional Array / C++ on visual studio 2019

2 Dimensional Array / C++ on visual studio 2019

2 Dimensional Array / C++ on visual studio 2019

Description

This assignment will require processing a 2 dimensional array.

Using the attached document ChildHeightDetection build a program that will prompt for a gender and age and height in inches. The age range should be 0-18. I would recommend printing the attached document.

Please disregard the ages 1/4, 1/2, 3/4, 1&1/2, and 2&1/2.  Start with Birth (0) and then 1 – 18.

Once you have obtained their growth percentage for the age, display the retrieved growth percentage and calculate and display the expected height in inches and feet+inches. This is calculated by dividing the inch calculation by 12 for the number of feet and the remainder in inches should be included.

Allow this input to be entered again unless I choose to exit.

Also see the XC 2 Dimensional Array Thoughts section below.

Deliverable is Flow Chart and working CPP program. 

Unformatted Attachment Preview

?XC: 2 Dimensional Array – Thoughts
Class,
Most of the issues around this task are related to the defining the array. 2D arrays can be thought of as spreadsheets, with a row and column. General solutions below are :
1. Create a 2 Dimensional Array with 19 rows and 2 columns.
float growthChart[19][2] = { { 28.6, 30.9 }, { 42.2, 44.7 }, { 49.5, 52.8 }, …..
or
float growthChart[19][2];
growthChart[0][0] = 28.6;
growthChart[0][1] = 30.9;
growthChart[1][0] = 42.2;
The statement “float growthChart[19][2]” implies 19 rows, with 2 columns to choose from.
Age is the implied row and gender can be column 0 or 1. Thus growthChart[age 0-18 ][0 or 1 for gender ] is a direct way to get to the data and does not require a loop.
2. Create a 2 Dimensional Array with 19 rows and 3 columns, age -boy% – girl%.
float growthChart[19][3] = { { 0, 28.6, 30.9 }, { 1, 42.2, 44.7 }, { 2, 49.5, 52.8 }, …..
or
float growthChart[19][3];
growthChart[0][0] = 0; // age
growthChart[0][1] = 28.6;
growthChart[0][2] = 30.9;
Age is column 0, and with boy % for column 1 and girl % for column 2. You could search this array with a for loop.
If growthChart[row][0] == age then percentage=growthChart[age – which is also the row][ gender 1 or 2]
Float or Double will handle the decimal place so “int” is not correct. Remember double can “double” the amount of memory used compared to float.
Both option 1 and 2 approaches are valid.
Option 1 appears simpler and takes advantage of the age and row always being the same index. However, this approach would completely fail if the data that was specified to be ignored needed to be added back in – (such as 3/4 or 0.75 age). By knowing the age is the row, there is no need to do a “for loop” to search.
Option 2 allows some flexibility and also clarity to this by explicitly defining the age values. Option 2 allows a serial search (for loop) if desired.
When calculating for number of feet, you can simply calculate into an int variable. Any excess is truncated by default since an int by definition contains only whole numbers.
To determine inches, consider the modulus operator – %. Your text book can direct you – it is listed in the back index under the word “Operators”.?XC: 2 Dimensional Array – Thoughts
Class,
Most of the issues around this task are related to the defining the array. 2D arrays can be thought of as spreadsheets, with a row and column. General solutions below are :
1. Create a 2 Dimensional Array with 19 rows and 2 columns.
float growthChart[19][2] = { { 28.6, 30.9 }, { 42.2, 44.7 }, { 49.5, 52.8 }, …..
or
float growthChart[19][2];
growthChart[0][0] = 28.6;
growthChart[0][1] = 30.9;
growthChart[1][0] = 42.2;
The statement “float growthChart[19][2]” implies 19 rows, with 2 columns to choose from.
Age is the implied row and gender can be column 0 or 1. Thus growthChart[age 0-18 ][0 or 1 for gender ] is a direct way to get to the data and does not require a loop.
2. Create a 2 Dimensional Array with 19 rows and 3 columns, age -boy% – girl%.
float growthChart[19][3] = { { 0, 28.6, 30.9 }, { 1, 42.2, 44.7 }, { 2, 49.5, 52.8 }, …..
or
float growthChart[19][3];
growthChart[0][0] = 0; // age
growthChart[0][1] = 28.6;
growthChart[0][2] = 30.9;
Age is column 0, and with boy % for column 1 and girl % for column 2. You could search this array with a for loop.
If growthChart[row][0] == age then percentage=growthChart[age – which is also the row][ gender 1 or 2]
Float or Double will handle the decimal place so “int” is not correct. Remember double can “double” the amount of memory used compared to float.
Both option 1 and 2 approaches are valid.
Option 1 appears simpler and takes advantage of the age and row always being the same index. However, this approach would completely fail if the data that was specified to be ignored needed to be added back in – (such as 3/4 or 0.75 age). By knowing the age is the row, there is no need to do a “for loop” to search.
Option 2 allows some flexibility and also clarity to this by explicitly defining the age values. Option 2 allows a serial search (for loop) if desired.
When calculating for number of feet, you can simply calculate into an int variable. Any excess is truncated by default since an int by definition contains only whole numbers.
To determine inches, consider the modulus operator – %. Your text book can direct you – it is listed in the back index under the word “Operators”.
Purchase answer to see full
attachment
Explanation & Answer:

1 Script

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20