Answer the following questions in a Word document

Question 1: What is overloading? How is it related to polymorphism? – 4 points

Question 2: What is UML? When do you create a Use Case Diagram? – 4 points

Question 3: Homework help – Write the C# code to declare an array variable called testScores to store 3 test scores. After declaring the array, populate the array by assigning the following scores to the three test scores respectively. – 4 points

Test Score 1 = 70

Test Score 2 = 65

Test Score 3 = 80

Question 4: Find the errors in the following C# code and correct them re-writing the whole for loop.

for (i = intMinNum; i <= intMaxNum; i);

     {                             

       Console.Homework help – WriteLine(i)             

     };

Question 5: Find the errors in the following C# code used to calculate total discounted price based on the total price and discount based on given conditions (no discount for quantity <= 100 and 5% for quantity > 100) and correct them re-writing the code.

if (itemQuantity <=100);

    {

      netTotal == itemQuantity * itemPrice;

    }

 elseif (itemQuantity > 100)

    {

     discountRate = .05;

     totalPrice = itemQuantity * itemPrice;

     discount = totalPrice * discountRate;

     netTotal = totalPrice – discount;

    }

 End if;

Published by
Write
View all posts