Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

PART B (15 Marks - 3 Marks each) 1. Write a C# method named HoursAndMinutes that takes minutes as a parameter to represent minutes worked

image text in transcribed
PART B (15 Marks - 3 Marks each) 1. Write a C# method named HoursAndMinutes that takes minutes as a parameter to represent minutes worked on a job, the function then prints hours and minutes for the given minutes. For example, 197 minutes becomes 3 hours and 17 minutes. 2. Write a loop that prints the sum of the integers from 1 through 500. 3. The following are prices for the two products Product Product Price (S) USB Drive 8.00 1 TB Hard Drive 59.00 Write a C# Method named calculate Prices() that will take the quantities of both these products as separate parameters to the function and return the total price. 4. Create a Box Class that has four parameters height, width, length and color. Create two parameterized constructors, one that takes height, width, length and color as its parameters and assigns them to the instance variables while one that takes only height, width and length. The second parameter assumes that when color is not given it the box is of "White" in color. 5. Taking the Box Class as your reference create an array of 3 Boxes and initialize each box in the array with the following test data. 1s Box=(10,10,10,"Red") 2nd Box=(20,20,20) 3rd Box = (10,10,10,"Black")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started