You are required to develop an App, which acts as a fashion advisor. The program will have a form where you can type in the colour of your top, your pants and your shoes. The program will then give advice on whether the colours match. The program can use any feedback mechanism desirable. The rules… Continue reading C# – Object Oriented Programming – Lab 5
Tag: lab
C# – Object Oriented Programming – Lab 4
Here is the scenario we want to test: – Write a “if else” statement that checks to see if bx and by are INSIDE the box. If the point (bx,by) is inside the box, print “Inside” otherwise print “Not inside”. (Hint use && in your answer) – Write a “if else” statement that checks to… Continue reading C# – Object Oriented Programming – Lab 4
C# – Object Oriented Programming – Lab 3
Write a program that reads a value representing a number of seconds and returns the equivalent amount of time in days, hours, minutes, and seconds. Here’s my solution for it:
C# – Object Oriented Programming – Lab 2 (Equation of a Line)
The equation of a line is given as: y = mx +c. Write a program that asks the user for the start and end points of a line and calculates values for m and c: m = The slope of the line (y2 – y1) / (x2 – x1) c = The intercept (where the… Continue reading C# – Object Oriented Programming – Lab 2 (Equation of a Line)
C# – Object Oriented Programming – Lab 1 (Roots of a quadratic equation)
So I thought I’d upload some of the C# Object Oriented Programming labs I was given in my Computer Games studies and my solutions for them. Here’s the first one: Lab1 Create a Windows Console application, with a number of variables: a, b c (floats) x1 and x2 (floats) hasRoots (boolean) The purpose of the… Continue reading C# – Object Oriented Programming – Lab 1 (Roots of a quadratic equation)