![]() Public CustomCake(string flavour, int numLayers,string occasion, int diameter, string design) Return "for the total cost of " + CalculateCostWithTax().ToString("C") Public Order(string fName, string lName, string flavour, int numLayers) Public Order(string fName, string lName, string flavour, int numLayers, string occasion, intĬake = new CustomCake(flavour, numLayers, occasion,diameter,design) Return " " + Flavour + " flavoured cake with " + NumOfLayers + " layer(s)" **public virtual double CalculateCakeCost() Public Cake(string flavour, int numLayers) LblOutOrder.Text = objcustomer.ToString() + objcustcake.ToString() + objorder.ToString() (int)numRadSize.Value, txtRadDesign.Text) ![]() Objcustcake = new CustomCake(txtRadFlavour.Text, (int)numRadLayers.Value, txtRadOcc.Text, Objcustomer = new Customer(txtFName.Text, txtLName.Text) Objcake = new Cake(txtRadFlavour.Text, (int)numRadLayers.Value) Private void btnOrder_Click(object sender, EventArgs e) You can read the rest of the code is down below and please tell me if there is a problem, because I don't see anything wrong. The calculate cost with tax method from the class "CustomCake" also seems to be working fine. Return CAKE_PRICE + (LAYER_PRICE * NumOfLayers) įrom class "Cake" since it seems to return the cake price, but not add it up with the bracket values. I'm thinking there might be something wrong with the method public virtual double CalculateCakeCost() For some reason it isn't displaying properly and shows "$22.60" every time. I have everything working perfectly except for the price. That’s creating more time and space for developers to focus on solving bigger problems and building even better software.Īnd now, you can put the power of GitHub Copilot to work in your preferred environment with a free trial.So I've made this form that acts as a cake shop. In files where it’s enabled, nearly 40% of code is being written by GitHub Copilot in popular coding languages, like Python-and we expect that to increase. With more than 1.2 million developers in our technical preview over the last 12 months, people who started using GitHub Copilot quickly told us it became an indispensable part of their daily workflows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |