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

In the box labeled Program Output below. Write the output of the folllowing logi

ID: 3772813 • Letter: I

Question

In the box labeled Program Output below. Write the output of the folllowing logic. Main() Integer code = 0 code = call colorCodeNumber("blue) code = code+10 print "Color code of blue is" + code end main function displayTitle() display "Color Code Program" end function function displayClosing() display a blank line display "Have a nice day!" end function integer function colorCodeNumber(string color) integer colorCode if(color == "red") colorCode = 1 elseif (color =="blue") colorCode = 2 else colorCode = 0 endif return colorCode end function 5 Returned $300 worth of damaged goods purchased on account from gallagher Co. on january 3. 6 Made cash sales for the week totaling $3,150. 8 Purchased merchandise on account to linton Corp.$5,400. invoice no 372,terms1/19,m30 11 Purchased merchandise on accoun from Cora Co.$3.700. 13 Paid in full Gallagher Co. on account less a 2% discount. 13 Made cash sales for the week totalling $6,260 15 Received payment from linton Corp.for invoice no. 372. 15 Paid semi-monthly salaries of $14,300 to employees. 17 Received payment from Wheeler for invoice no 371. 17 Sold merchandise on accont to Delaney Co. $1,200,Invoice no 373. 19 Purchased equipment on account from Dozber Corp. $5,500. 20 Cash sales for the week totaled $3,200. 20Paid in full Phegley Co. on account less a 2% discount. 23 Purchased merchandise on account from Gallagher Co $7,800. 24 purchased merchandise on account from Atchison Corp $5,100. 27 Made cash sales for the week totaling $ 4230. 30 Received payment from Delaney Co.for invoice no. 373 paid semi-monthly salaries of $13,200 to employees. 31 Sold merchandise on account to Wheeler $9.330. Invoice no. 374, terms 1/10. Accounting informations systems

Explanation / Answer


Output of program logic:

Color code of blue is 12
(Blank Line)
Have a nice day!


Explanation of Output:
In the main program , code is set to zero initially.
code=0
Now calling method
code=colorCodeNumber("blue")

The method colorCodeNumber("blue") returns the colorCode=2
as return value from the method to calling main method.

Now in main , code set to 2

The statement code=code+10
code=2+10=12
Now code =12

The statement print "Color code of blue is "+code prints
Color code of blue is 12 --------Output Line1

Then calls the method displayClosing method

Prints a Blank Line --------Output Line2
Prnts Have a nice day! message --------Output Line3

Total output

Color code of blue is 12
(Blank Line)
Have a nice day!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote