Photo AI

The online-shopping website of a company called MajorMax allows customers to buy items online from various departments at their store - NSC Information Technology - Question 3 - 2017 - Paper 1

Question icon

Question 3

The-online-shopping-website-of-a-company-called-MajorMax-allows-customers-to-buy-items-online-from-various-departments-at-their-store-NSC Information Technology-Question 3-2017-Paper 1.png

The online-shopping website of a company called MajorMax allows customers to buy items online from various departments at their store. The manager of the company mus... show full transcript

Worked Solution & Example Answer:The online-shopping website of a company called MajorMax allows customers to buy items online from various departments at their store - NSC Information Technology - Question 3 - 2017 - Paper 1

Step 1

Button [3.1 - Sales information]

96%

114 rated

Answer

To display the sales information, start by setting up the appropriate headings to represent the department names and the week numbers. Next, loop through each department in the arrSales array and display their corresponding sales figures for each week within the output component provided. For each monetary value displayed, ensure it is formatted to two decimal places to maintain currency standards.

Step 2

Button [3.2 - Display underperforming departments]

99%

104 rated

Answer

Begin by displaying the required headings for the report. To determine underperforming departments for each week, loop through the weeks and initialize a variable to sum the sales. Calculate the average sales figure for each week. Then, create a nested loop to go through each department and check if its sales figure is below the average. If so, display the department name and sales figure formatted in currency.

Step 3

Button [3.3 - New week]

96%

101 rated

Answer

Assign the filename based on the current week number, and ensure the previous week's data is saved in the specified format. Use a loop to move data from the arrSales to archive the previous values as required. Generate new sales data randomly within the specified range of R500 to R5000 for the new week and update the display accordingly.

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;