Getting some errors at least this time I know why..seems like I am not declaring the methods inside my classes I tried rearranging the method and then inserting all my code into a class but Im still getting all those errors in the bottom.
If you guys can tell me how to also avoid this problem in the future that would be great!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Problem8Pg179
{
public class GranolaSales
{
public static void Main()
{
const int NUMBER_OF_BARS = 12;
const double NUMBER_OF_CASES = 5;
const double ASSOCIATION_FEES = 0.10;
string inputValue;
int cases,
bars;
DisplayInstructions();
cases = GetCases("cases");
bars = GetBarPrice("bars");
DisplayResults();
Console.ReadKey();
}
// public static void DisplayInstructions();
// {
// Console.WriteLine("This program will calculate granola sales");
// Console.WriteLine("Please enter the number of cases sold and price per bar.");
// Console.WriteLine("Please enter in the following values...");
// }
// public static int GetBars(int bars)
// {
// Console.WriteLine("Please enter number of {0} sold: ");
// inValue = Console.ReadLine();
// someintValue = int.Parse(inValue);
// return someIntValue;
// Console.Clear();
// }
//public static int GetPrice(int price)
// {
// Console.WriteLine("Please enter the price per {0}: ");
// inValue = Console.ReadLine();
// someintValue = int.Parse(inValue);
// return someIntValue;
// Console.Clear();
// }
//public static int CalculateSales(int bars, int cases)
//{
// return bars * price;
//}
//public static int CalculateProceeds(int ASSOCIATION_FEES, int bars, int cases)
//{
//return ASSOCIATION_FEES * (bars * cases);
//}
//public static double DisplayResults(int bars, int cases, int ASSOCIATION_FEES);
//{
//Console.WriteLine("Club Proceeds: {0:C2}"
// , CalculateProceeds));
////inputValue = Console.ReadLine();
////someintValue = int.Parse(inputValue);
////return someIntValue;
////Console.Clear()
}
}
public static void DisplayInstructions();
{
Console.WriteLine("This program will calculate granola sales");
Console.WriteLine("Please enter the number of cases sold and price per bar.");
Console.WriteLine("Please enter in the following values...");
}
public static int GetBarPrice(int barPrice)
{
Console.WriteLine("Please enter the {0} of each bar: ");
inValue = Console.ReadLine();
someintValue = int.Parse(inValue);
return someIntValue;
Console.Clear();
}
public static int GetCases(int price)
{
Console.WriteLine("Please enter the number of {0} sold: ");
inValue = Console.ReadLine();
someintValue = int.Parse(inValue);
return someIntValue;
Console.Clear();
}
public static int CalculateSales(int bars, int cases)
{
return bars * cases;
}
public static int CalculateProceeds(int ASSOCIATION_FEES, int bars, int cases)
{
return ASSOCIATION_FEES * (bars * cases);
}
public static double DisplayResults(int bars, int cases, int ASSOCIATION_FEES);
{
Console.WriteLine("Club Proceeds: {0:C2}"
, CalculateProceeds));
//inputValue = Console.ReadLine();
//someintValue = int.Parse(inputValue);
//return someIntValue;
//Console.Clear()
}
The name 'GetCases' does not exist in the current context 22 21
The name 'GetBarPrice' does not exist in the current context 23 20
The name 'DisplayResults' does not exist in the current context 26 13
The name 'DisplayInstructions' does not exist in the current context 20 13
Expected class, delegate, enum, interface, or struct 80 24
Expected class, delegate, enum, interface, or struct 87 22
Expected class, delegate, enum, interface, or struct 96 19
Expected class, delegate, enum, interface, or struct 105 19
Expected class, delegate, enum, interface, or struct 110 19
Expected class, delegate, enum, interface, or struct 116 19
Thanks Again!