title: how do I use a custom class in an existing C# program that did not use a class?
body: <p>I'm new here and forgive me if I don't do things right in the beginning.</p>
  
  <p>I have an existing program that I had to create for a course. The program asks for a person first and last name and how many cakes he would like to order and the output in the groupbox show a thank you message with the persons full name along with how many cakes were ordered and the total cost of the cakes with tax included. The next lab asks me to modify the program so that I can use a custom class to produce the same results of the former program with the new class. I hope this makes sense. Below is part of my original program.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  
  namespace Order_Cake
  {
      public partial class frmOrderCake : Form
      {
          public frmOrderCake()
          {
          InitializeComponent();
          }
  
      private void frmOrderCake_Load(object sender, EventArgs e)
      {     
      }
  
      private void btnEnter_Click(object sender, EventArgs e)
      {
          lblThanks.Text = "Thank you" + (" ") + txtFirstName.Text + (" ") + txtLastName.Text + "!";
          txtCakesOrdered.Text = nudCakes.Value.ToString();
          txtTotalCost.Text = (20 * Convert.ToDouble(nudCakes.Value) * 1.13).ToString("C");
          grpOutput.Visible = true; 
      }
      private void btnClear_Click(object sender, EventArgs e)
      {
          txtFirstName.Clear();
          txtLastName.Clear();
          txtCakesOrdered.Clear();
          txtTotalCost.Clear();
          nudCakes.Value = 1; 
          grpOutput.Visible = false; 
      }
      private void btnExit_Click(object sender, EventArgs e)
      {
          this.Close(); 
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>for one of the classes I've started the below.</p>
  
  <pre><code>namespace Order_Cake
  {
      class Cost
      {
         private int basePrice = 0;
         {
             get
             {
                 return basePrice;
             }
             set
             {
                 basePrice = value;
             }
         }
     }
  } 
  </code></pre>
  
  <p>of course this would include a class for tax and totalCost and such. I simply don't know how I can incorporate the class into my Cake program. Any help or suggestions will be greatly appreciated.</p>
  
  <p>Thanks,</p>