C# PROG110 CH 7 Homework.txt - using System using System.Collections.Generic using System.Linq using System.Text using

C# PROG110 CH 7 Homework.txt - using System using...

This preview shows page 1 - 2 out of 2 pages.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; // //CH7Homework PROG 110 Fall 2019 100% grade received // namespace Desks { class Program { static void Main(string[] args) { int numberOfDrawers = 0; string deskWoodType = "o"; double cost = 0; drawers(out numberOfDrawers); woodType(out deskWoodType); CalculateCost(ref deskWoodType, ref numberOfDrawers, out cost); OutPutCost(numberOfDrawers, deskWoodType, cost); } private static void drawers(out int numberOfDrawers) { int numOfDrawers; Console.WriteLine("Enter the number of drawers you need"); numOfDrawers = Convert.ToInt32(Console.ReadLine()); numberOfDrawers = numOfDrawers; } private static string woodType(out string deskWoodType) { Console.WriteLine("Enter the type of wood you require: (ie. type Mahogany, Oak, or Pine)"); deskWoodType = Convert.ToString(Console.ReadLine()); switch (deskWoodType) { case "mahogany": { deskWoodType = "Mahogany"; break; } case "oak": { deskWoodType = "Oak";
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Fall '17
  • Return statement, Void type, static void Main, private static void drawers

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture