Scenario: ABC Supermarket is a local township supermarket based in Germiston, East rand of Johannesburg in
South Africa. The supermarket sells a wide variety of food and household products.
The supermarket takes online orders through their website and currently averages about 20 000
unique visitors to their website per day and has 10 content uploaders constantly updating their
website and making sure the site is always up-to-date. The website is in highest demand from 07:00
until 17:00 Mondays to Saturdays and very minimal activities on any other times. The website is hosted and managed locally by a small IT department of six employees. Besides not
coping with the website traffic load, the local energy supplier, Eskom has decided to implement load
shedding at different times of the day
Question A. Self-healing and redundancy(Marks: 30)
Explain any five recommendations that should be looked at related to the principles of selfhealing and redundancy in the design of the ABC supermarket module
Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If userValues is {2, 1, 2, 2} and matchValue is 2 , then numMatches should be 3.
Your code will be tested with the following values:
matchValue: 2, userValues: {2, 1, 2, 2} (as in the example program above)
matchValue: 0, userValues: {0, 0, 0, 0}
matchValue: 10, userValues: {20, 50, 70, 100}
Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:
7 9 11 10
10 11 9 7 Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. Ex: If runTime = {800, 775, 790, 805, 808}, print:
800
775
790A library charges a fine for every book returned late. For first 5 days the fine is 50 Rs, for 6-10 days fine is 100 rupee and above 10 days fine is 150 rupees. If you return the book after 30 days your membership will be cancelled. Write a program C# to accept the number of days the member is late to return the book and display the fine or the appropriate message.
Polynomial
Given polynomial,write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1+....+C1x+C0 format.
Input
The first line contains a single Integer N.
Next N lines contain two integers Pi,Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.
Sample Input 1
5
0 2
1 3
2 1
4 7
Sample output 1
7x^4 + 6x^3 + x^2 + 3x + 2
Sample input 2
4
0 5
1 0
2 10
3 6
Sample output 2
6x^3 + 10x^2 + 5
Add two Polynomials
Given two Polynomials A and B,write a program that adds the given two Polynomials A and B.
Sample input 1
4
0 5
1 0
2 10
3 6
Sample Output 1
Sample Input 2
4
0 5
1 0
2 10
3 6
3
0 1
1 2
2 4
Sample output 2
6x^3 + 14x^2 + 2x + 6
IPL Match Details
Write a program that reads all the match outcomes and summarizes the information of all the matches.
Points are given to the terms based on the outcome of the match.
A win earns a team 3 points.A draw earns 1.A loss earns 0.
The following information is expected:
MP:Matches Played
W:Matches Won
D:Matches Drawn(Tied)
L:Matches Lost
P:Points
The team information should be displayed in descending order of points.
Sample input 1
6
CSK;RR;loss
RR;DD;draw
MI;KKR;win
KKR;RR;loss
CSK;DD;draw
MI;DD; draw
Sample output 1
Team: RR, Matches Played: 3, Won: 2, Lost: 0, Draw: 1, Points: 7
Team: MI, Matches Played: 2, Won: 1, Lost: 0, Draw: 1, Points: 4
Team: DD, Matches Played: 3, Won: 0, Lost: 0, Draw: 3, Points: 3
Team: CSK, Matches Played: 2, Won: 0, Lost: 1, Draw: 1, Points: 1
Team: KKR, Matches Played: 2, Won: 0, Lost: 2, Draw: 0, Points: 0
Create a menu to calculate the area and perimeter of different figures
Triangle, Oval, Trapezium, Hexagon, Circle, Pentagon, Cone, Decagon in windows form
Create a Midi Parent form
Build a GPA calculator that inputs grades of 3 different subjects along with the credit hours
from the user and displays the user’s GPA. The input grades and their corresponding grading
points are given below.
Grade Points
A 4.0
A- 3.67
B+ 3.33
B 3.0
B- 2.67
C+ 2.33
C 2.0
C- 1.67
D+ 1.33
D 1.0
F 0
The formula is
GPA = (GP1 * CH1 + GP2 * CH2 + GP3 * CH3)/ (CH1 + CH2 + CH3)
Where GP1 is Points of Subject 1 and CH1 show credit hours of subject 1.