Pizza Program Calculation?

May 23, 2010

I just need help with my Pizza Program in calculations. It keeps on adding on top of the original calculations. I did try to set the variables to 0, but that really didn't work out since the price that is shown turns out to be 0.

View 1 Replies


ADVERTISEMENT

Write A Program That Calculates A Bill For Pizza Shop?

Oct 12, 2009

I am trying to write a program that compute the bill for a pizza shop and I cannot figure out what I am doing wrong when I build it there are no errors but when I debug it it will not run [code]...

View 4 Replies

VB 10 - Program - Calculate The Number Of Slices That Can Be Cut From A Pizza That Size - Errors Saying "With Held " Events

May 23, 2012

Write a complete Visual Basic program to do the following: Joe's Pizza Palace needs an application to calculate the number of slicesa pizza of any size can be divided into.

The application should do the following:
ï‚· Allow the user to enter the diameter of the pizza, in inches.
ï‚· Calculate the number of slices that can be cut from a pizza that size.
ï‚· Display a message that indicates the number of slices.
To calculate the number of slices that can be cut from the pizza, you must know these facts:
ï‚· Each slice should have an area of 14.125 inches.
ï‚· To calculate the number of slices, divide the area of the pizza by 14.125.
 The area of the pizza is calculated with the formula: Area = π r2

Note: The π is pi which is equal to 3.14159.The r is the radius of the pizza. Divide the diameter
by 2 to get the radius.

Form:
The application should be done form-based. You may design your own form. It must have the following:
ï‚· a label indicating that it is Joe's Pizza Palace
ï‚· a field with label to enter the size (diameter) of the pizza
ï‚· a field with label to display the number of slices
ï‚· buttons to calculate the number of slices and to exit the application

Output:
Use the following test data to determine if the application is calculating properly:
Diameter of Pizza Number of Slices
22 inches 27
15 inches 13
12 inches 8

Requirements:
ï‚· Name the project Pizza.
ï‚· Be sure to include your name included in a comment
ï‚· No credit is given for a program that will not execute.
ï‚· All rules of academic integrity should be applied as stated in the syllabus.
ï‚· Submit the zipped project into Moodle.

I have errors saying "With Held " events

WHAT IS WRONG WITH what I HAVE

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button3.Click
' End the application
End
End Sub

[CODE]...

View 3 Replies

Code For A Calculation Program?

May 28, 2009

allow the user to enter a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, price per share, number of shares involved, and the stock broker's name. Assume price per share = P. The stockbroker's commission is computed in the following manner: If the P (price per share) is less than or equal to $50, the commission rate is $0.19 per share, if P is greater than $50, thecommission rate is $0.26 per share. If the number of shares sold is less than 150, the commission is 1.5 times the rate per share. Display the results in a message box, including the total commission earned.

View 2 Replies

Creating Calculation Program?

May 28, 2009

Fist off, I am new at this and only learning it for a class. We have a program to create using Visual Studio 2008. The teacher doesn't give us much to go by so I really have no idea where to even start so any code will be a great help. Here is what i have to create:Your project will allow the user to enter a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, pricer per share, number of shares involved, and the stock broker's name. Assume price per share = P. The stockbroker's commission is computed in the following manner: If the P (price per share) is less than or equal to $50, the commission rate is $0.19 per share, if P is greater than $50, the commission rate is $0.26 per share.

View 1 Replies

Calculation Program For Test Score

Feb 24, 2009

I'm new to VB and I'm doing a calculations program for test scores. I got everything setup for my clear and exit buttons but not sure what I have to put in the calculate button code for it to calculate. Here is what I have so far.

Public Class Form1
Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblTestScore5.Click
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
[Code] .....

View 13 Replies

Program For The Calculation Of Bicycle Gears?

Jan 30, 2010

I am having trouble with a program for the calculation of bicycle gears. you are required to enter the wheel radius the the teeth on the front sprocket followed by the teeth on the rear sprocket. On the first entry of the rear sprocket number, the program will calculate the effictive radiusand display it in a label. If there are subsequent entries of sizes for the rear sprocket then the effective radius is calculated as before as well as the ratio between the current and previous radius.

[Code]...

View 4 Replies

Setting Up A Quote Calculation Program?

Apr 10, 2012

I'm setting up a quote calculation program for my business.I'm just a beginner with Visual Basic (2010 Express) and am finding it very interesting.I already did some reading and followed the tutorials but I'm getting stuck with my program now.

[Code]...

Make it possible for users to enter necessary data in the "new quote" screen. The data needs to be written into the database table of "new quote"Make it possible for users to lookup previously made quotes in the "open quote" screen. I want them to be able to select a quote based on "quotenumber" or "customername".They then must be able to select a quote, which will open a new window with all quote information from the tables. This information needs to be editable and savable to the databaseGenerate a PDF of a "finished" quote and mail it as attachment to a customerthe "customer information" table contains information for the quote concering address and name of customer. I want this so that users can select a customer in the "quote screen" and all other data will be filled in automatically. I also want that users
can give in a new customer in the quote screen and that that customer will be saved in the "customer information" table.point 4 is also applicable for the "material information table".

View 1 Replies

Syntax - Calculation For A Bowling Program ?

Nov 18, 2009

I am having a problem with the syntax of this calculation for a bowling program that I am writing for school,

If radMale.Checked = True Then
(200 - decAverage) * .75
lblAverage.Text = FormatNumber(decAverage)

View 1 Replies

Use Circular Reference In A Calculation In Program?

Sep 1, 2010

I've got a requirement where I need to calculate a value, however also refer to this value when calculating it. So I've got for example[code]...

I can see how this can be achieved in excel using Circular Reference, however I'm not sure how I go about it when using VB.Net. Is there a similar method to create a Circular Reference as in excel or any other way I can possibly work out the TotalValue?

View 5 Replies

Validate A Number Calculation Program?

May 25, 2010

i need the program to reject letters and words which are entered into the text boxes and only accept numbers. At the moment i am using IF statements but i need a more pratical approach to this.

View 4 Replies

VS 2010 Quote Calculation Program With VB?

Mar 30, 2012

I am making a quote calculation program with Visual Basic. Per quote there can be multiple parts/products.

What I want now:

1) insert productinformation (dimensions, quantity etc.) in one form

2) write this data into a table or something

The program then needs to calculate prices etc. but first it is important to get the data right for the calculation.

What I am thinking of myself is putting the data into textboxes and then let this data be transported to a table and have one product per line in that table. from this it can be calculated

View 19 Replies

VS 2005 Store A Calculation To Use Later And Obtain A New Calculation

Dec 19, 2009

I need to store a calculation to use later and obtain a new calculation

[Code]...

View 4 Replies

Design A Pizza Management System In VB?

Feb 8, 2010

Designing the system of Pizza Management...I prefer to use vb.net language for developing because its more easy and more deploy able than others.

View 2 Replies

Keeping A Total - Size Of Pizza Which Is A Combo Box (CmbSize)

Apr 7, 2011

Anyway I am writing a program to allow the user to enter:

-size of pizza which is a combo box (CmbSize)
-type (thin crust or standard) of pizza which is a combo box (CmbType)
-pizza choice (spicy chicken, maryland etc) using a checked listed box (ChkdListChoice)

The problem I have that will probably be simple to a lot of you who are using this language frequently is that I simply want keep a running subtotal of the users choice. So for example the user chooses 8" Spicy Chicken - 3.50, then they press the BtnAddToOrder button to output it to the Textbox (TxtPizzaChoi). When the user adds the next pizza I simply want the previous pizza price to be added to this one giving a new subtotal. I have not made the price change if the user changes the size to 12" spicy chicken, the price is still 3.50, simply because I think this could make it more difficult to me and I don't have lots of time to work on this. My declarations are not all in use and i may not need them by the way.

Heres the code:

Public Class PizzaChoices
Dim price As Decimal
Dim topping As Decimal

[CODE]...

View 2 Replies

VS 2010 Make A Combobox When Selected A Sort Pizza?

Jan 2, 2011

i cant get this to work,i am trying to make an Combobox when i selected a sort pizza it shall tell me the price with a messagebox. iam using accdb database who i connected with datasource

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedValue = "" Then

[code]....

i get an error that says there is no value for execute?and strange, if i post a value insteed of combobox.selected value, iam also not getting some value?

View 2 Replies

Develop An Application With An Accessible User Interface For Pizza Station?

Sep 3, 2009

i'm new with visual basic and i need some help to finish this program.This are the instructions and the code that i have is below.You need to develop an application with an accessible user interface for Pizza Station to take pizza orders. The interface should allow the user to enter the following information:

Customer name
Size of the pizza
Toppings desired

When the user clicks the Order button, a summary of the order and its cost should be displayed in a message box and the controls should be cleared to make the form ready for the next order.

[Code]....

View 3 Replies

Pizza Shop - Take Orders - Populate Text Box From Databound Combo Box?

Sep 28, 2010

got a pizza shop and the assingment is to create a application which alows the user to take a customer's order... I have a combo box filled with all of the items you can order (data from an access file)... and I need to have it so that when you select an item, it shows up in a text box below... I keep getting an error message saying you can't convert datarowview to string..

here is some

Private Sub TakeOrders_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PROJECT4DataSet.Items' table. You can move, or remove it, as needed.
Me.ItemsTableAdapter.Fill(Me.PROJECT4DataSet.Items)
End Sub

[code]....

View 3 Replies

Sub Procedures - Pizza Vendor - Display An Itemized Bill - Calculate The Total Cost

Oct 27, 2009

This is my project for class and this is what i have so far but my teacher gave me no credit. What am i doing wrong? i tried rearranging it but no success.

A fast-food vendor sells pizza slices at $1.25 each, fries at $1.00, and soft drinks at $0.75. Write a program to computer a customers bill. The program should use 4 subprocedures that do the following:

1. read in the amount of each item ordered

2. calculate the total cost

3. display an itemized bill

4. read in the users full name from a textbox, and display a sentence, addressing the user by first name only and in upper case characters, informing the user of their bill

Here is an example itemized bill:
Item Quantity Price
Pizza slices 3 $1.25
Fries 4 $1
Soft drinks 5 $0.75
Total $11.50

Example sentence for point 4: if the user name was entered as John Smith, you would display the sentence JOHN, your bill is $11.50.

MY

Public Class Form1

Sub pizza(ByVal pizzap As Double, ByVal pizzanum As Double)
lstoutput.Items.Add("Pizza Slices" & pizzap & "and" & pizzanum & "is" & (pizzap * pizzanum) & ".")

[CODE]....

View 6 Replies

Time Formating And Calculation - Time Value In My Program ?

Feb 23, 2010

With a Time value in my program. Basically, I am importing a travel Time from a database e.g. 3:45 so it takes 3 hrs and 45 minutes to get from a to b. I then want to double this - 3:45 * 2 = 7:30, and then want to multiply it by a cost e.g. travel is charged at 25 per hour. so it would be total travel time = 7:30. Travel cost = 25. Total Travel Cost = 7:30 * 25. In the access db, it is stored as a text field, and then imported in vb as a string.

View 1 Replies

Add Vat To A Calculation?

Mar 9, 2009

Heres my code in vb 2008[code]...

I need to add 15% vat to it and i have no clue how to add the 15% vat.

View 1 Replies

Calculation Of Age?

Aug 29, 2010

compute an exact age of a person using the format date of mm/dd/yy... in vb.net, i was trying to code it but the result was not the exact age of the person.lp me...

View 11 Replies

'if / Else Calculation Statements

Oct 6, 2010

I am using Microsoft Visual Studio 2008 with VB.NET, and in class we were assigned this project: A procedure should calculate a 2% price increase on all red shirts, but a 1% price increase on all other items. In addition to calculating the price increase, the procedure also should calculate the new price. You can use the variables strItemColr, strItem, decOrigPrice, decIncrease, and decNewPrice. Format the original price, price increase, and new price in the lblOriginal, lblIncrease, and lblNewPrice controls, respectively.

View 1 Replies

Calculation In DataGridView?

Sep 12, 2010

I have datagridview, wich have 5 columns

example:

id supplier bought payed sum
1 a 15
2
2 a 20

[Code].....

View 3 Replies

Calculation In Function Is Different?

May 8, 2011

i have an issue with my program. when i create a function and use a calculation in it it returns a wrong answer. if i copy the calculation and put it directly in the btnClick event it works ok. is this normal?

here is the code if you would like to try see what i am doing wrong.
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click

[code].....

View 6 Replies

Calculation In VB - Keep Getting An Output Of Zero

Aug 21, 2010

I'm having trouble with a calculation in VB and it's a simple one but for some reason I keep getting an output of zero.

Here's the code for the calculation and the click button:

CODE:

View 5 Replies

Calculation Of Amount Due?

Apr 15, 2012

i have this problem on how to calculate the amount due in our system in VISUAL BASIC.NET .in returning module, (this is for penalty purposes), if the borrower didn't return the book on time, the system must automatically generate the amount due .one daY is equivalent to 10(ten) pesos.so if the borrower didn't return the book with 2 days. the amount due must be 20.00 pesos.

View 6 Replies

Calculation Of Two Fields In ASP.NET ?

Jan 5, 2011

I have two money fields in a SQL database called TotalClaimed and PartialSettlementAmountRecd.They are declared as Decimals like so:

Public PartialSettlementAmountRecd As Decimal
Public TotalClaimed As Decimal

They both output the repsective amounts perfectly. I need to do a calculation on them, by subtracting PartialSettlementAmountRecd from TotalClaimed. I have tried the following, but it just outputs a random number, not the amount I require.

Dim NewSettAmount As Decimal = (ClaimDetail.TotalClaimed) - (ClaimDetail.PartialSettlementAmountRecd)
Response.Write("New Settlement Amount: £" & NewSettAmount)

View 3 Replies

CRC-16 Calculation On An Array

Feb 1, 2012

I found this thread in regards to calculating CRC16 on an array.... however, it does not work probably because it was written for VB6 and not .NET. [URL] Does anyone know of a built-in function in .NET to calculate CRC16? If not, is there a way I can adapt the above VB code example to work with Visual Studio 2010?

View 12 Replies

Doing A Calculation Between Textbox?

Mar 15, 2012

what i am trying to do is i have two textboxs which have figues in them and need the 3rd textbox to display the figure the code i am using doesnt seem to be doing anything could anyone spot it and tell me why it is not working for me

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved