Module 6 assignment Solution.ZIP

Module 6 assignment Solution

Your success on the Module 6 assignment relies heavily on your ability to skillfully incorporate the concepts presented in Chapter 4 and 5 to those presented in this module. If you have any questions about those chapters you may want to get them answered before you embark on this project.Use single subscripted array(s) to solve the following problem. A company pays its sales people on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $3000 in sales in a week receives $200 plus 9% of $3000, or a total of $470. Design a program that determines how many of the salespeople earned salaries in each of the following ranges.$200-$299
$1000 and over
You will need to declare two arrays, one to hold the salary range and the other to accumulate the count of salespeople in that range.When you have to check for a range you store either the lowest value in each range in the array and compare the salary to each of those values or you can store the highest value and compare to that. The only change will be the relational operator that you use for your comparison.Which ever configuration you decide to use should be duplicated in a parallel counter array so that when you determine which range the sales fit into you have the subscript for the counter array already determined.Your output should list the salary range and the number of salespeople in that range.

Write the Flowchart, and JavaScript code for the following programming problem based on the pseudocode below.


Last year, a local college implemented rooftop gardens as a way to promote energy efficiency and save money.  Write a program that will allow the user to enter the energy bills from January to December for the year prior to going green.  Next, allow the user to enter the energy bills from January to December of the past year after going green.  The program should calculate the energy difference from the two years and display the two years worth of data, along with the savings. 


Hints:  Create three arrays of size 12 each.  The first array will store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference.  Also, create a string array that stores the month names.  These variables might be defined as follows:


notGreenCost = [];

goneGreenCost = [];

savings = [];


You will also need an array to hold the month names:


months = [“January”, “February”, “March  “, “April  “, “May   “, “June   “, “July   “, “August”, “September”, “October”, “November”, “December”];

The extra spaces in March – June help in lining up the output shown below.


Your sample output might look as follows:
Powered by