Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please Help. Make sure you follow every instruction and do it clearly. Thanks Pr

ID: 3752049 • Letter: P

Question

Please Help. Make sure you follow every instruction and do it clearly. Thanks

Programming Assignment 1/2 Scenario: Wanting to practice your new-found problem solving and programming skills, you volunteer for GMUFriendMatch.com, a Web site geared towards helping GMU students make new friends. It will be your job to create a program to help determine if two people should be friends, according to the proprietary algorithm identified below Create a program that will allow a user to enter each person's favorite color, favorite number (between 1 and 10, inclusive), and current number of friends. After all values are entered, if no invalid values are entered, a compatibility rating will be calculated as follows: * The compatibility rating starts at 0 .Two people with a matching favorite number adds 2 to the compatibility rating . Two people with a matching favorite color adds S to the compatibility rating . For each person, having less than 10 current friends adds 4 to the compatibility rating, while having 10 or more current friends adds 1 to the compatibility rating Once the compatibility rating is calculated, print a well-formatted message that includes the information collected for each person, the compatibility rating, and the level of compatibility. The level of compatibility is determined as follows: . For a compatibility rating of 7 or more, the level of compatibility is VERY COMPATIBLE . For a compatibility rating of 3 or less, the level of compatibility is NOT AT ALL .In all other cases, the level of compatibility is POSSIBLY COMPATIBLE However, if after all values are entered there is at least one invalid value entered, the program shoukd display an error message to contact the IT department and then end other .Your solution may not use any functions or language constructs not covered during this semester's IT 106 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same playing field regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not Copyright 2018 John Bono, Ph.D. All rights reserved. give you as much practice as solving the problem yourself. Doing this may lead to a substantial grade penalty, a grade of zero, or an Honor Code inquiry. When in doubt, askl Hints: This assignment will use multiple selection control structures. Your logic for the solution should properly use control structures to determine which portions of the algorithm are executed. The algorithm should be designed to only exit once the algorithnm has finished. In other words, do not try to exit out of your algorithm midway. The algorithm should only end when the last statement has been reached and evaluated. This also means you should not rely on any type of exit, break, quit (or similar) statements in your logic There are several validations that must occur. Think about what type of validation might be appropriate and make sure these are all handled. Don't forget about what youerned about data validation. . .

Explanation / Answer

ANS:

Initliaize pcolor to null

Initliaize pnum to zero

Initaialzie currfrnd to zer0

Initliaize pcolor2 to null

Initliaize pnum2 to zero

Initaialzie currfrnd2 to zer0

Set compa = 0

Accept the favourite color of the person and store it in pcolor

Accept the favourite number of the person and store it in pnum

Accept the current number of friend of the person and store it in currfrndm

Accept the favourite color of the person and store it in pcolor2

Accept the favourite number of the person and store it in pnum2

Accept the current number of friend of the person and store it in currfrndm2

If pnum matches with pnum2

compa=compa+2

If pcolor matches with pcolor2

compa=compa+5

if currfrnd < 10 ORcurrfrnd2 <10

compa=compa+4

if currfrnd > 10 ORcurrfrnd2 >10

compa=compa+1

Display both user Favourite number,color and current frnds

if compa >= 7

Print Both the users are very comfortable

else if compa <=3

Print Both the users are very Not At All comfortable

else

Print Both the users are Possibly comfortable

IF YOU WANT ANY EXTRA ANSWER COMMENT BELOW I WILL DO IT ASAP

HOPE THIS HELPS

THANK YOU