dayo92/projectOne

clean up code

Closed this issue · 1 comments

// First excerise
string introductionText = "TileCost Calculator";
Console.WriteLine(introductionText);

  • useless comment --> // First excerise
    You can of course write developer comments in your program, but information on which type of project this is should either belong on top of the file or in the github read.me (also there is spelling error xD)

  • no need to first create a variable that is then only used for printing it. You can directly write:

Console.WriteLine("TileCost Calculator"); 

Console.WriteLine("I need " + requestedWidth + " in width.");
Console.WriteLine("I need " + requestedLength + " in length.");
Console.WriteLine("And the cost per unit is £" + costPerUnit + ".");

  • also this "confirmation" prints are not really needed. You can do this, if you allow the user to verify and accept the given input (like "Those were your entered values ... You are sure this is correct? Y/N")
    But if you don't allow to change this input there is not much given from printing them out again because they are still visible on the screen
    image