Hello all, im doing this problem which will allow a store to return a invoice, I have two classes and I guess I am at the very end and need help fixing some things so I can finally have the program execute:
Class1: "Invoice":
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace InvoiceApp
{
class Invoice
{
private string invNumber;
private string invDescription;
private int invPrice;
private int invPurchased;
private double invTotalCost;
public Invoice()
{
}
public Invoice(string number)
{
invNumber = number;
}
public Invoice(string number, string description)
{
invNumber = number;
invDescription = description;
}
public Invoice(string number, string description,
int price, int purchased)
{
invNumber = number;
invDescription = description;
invPrice = price;
invPurchased = purchased;
}
public string InvNumber
{
get
{
return invNumber;
}
set
{
invNumber = value;
}
}
public string InvDescription
{
get
{
return invDescription;
}
set
{
invDescription = value;
}
}
public int InvPrice
{
get
{
return invPrice;
}
set
{
invPrice = value;
}
}
public int InvPurchased
{
get
{
return invPurchased;
}
set
{
invPurchased = value;
}
}
public double InvTotalCost
{
get
{
return invPurchased * invPrice;
}
set
{
invTotalCost = value;
}
}
public override string ToString()
{
return "Item Description: " + invDescription.ToString(); +
"\nTotal Cost: " + invTotalCost.ToString("C");
}
} //class ends
} //namespace ends
Class2: "InvoiceApp" :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace InvoiceApp
{
class InvoiceApp
{
static void Main(string[] args)
{
Invoice someQuantity = new
someQuantity.InvPurchased = someQuantity.InvPurchased * ;
Console.Write(someQuantity);
Console.Write(someDescription);
Console.ReadKey();
} //Main Ends
} //class ends
} //namespace ends
Line 104-109 Im trying to get to the point where I return what the Item Description and total cost in "Class1, Invoice"
Lines 12-22 in Class2: "InvoiceApp" Im trying to use constructors and objects to help me print to the output screen
Thank you very much again all of you!