Application Function To Calculates The Total Cost Of A Stay In A Hotel

Nov 29, 2010

Create an application that calculates the total cost of a stay in a hotel If the check in occurs in November-March the rate is $89/night. April-August is $99/night and September-October is $109/night. $10/night should be added if more than 2 people are in the room. More than 4 people are not allowed in the room, and a traveler can only request 1 room. A 15% tax should be added to the room rate and 10% tax added to all room service and other charges. No tax will be added for phone charges.

The program should use a function to calculate the total charges for the visitor's stay and output it to a label. There should be buttons or menus to calculate the total, clear the form, and exit the application. At least one of the button should call a sub procedure which performs its function. [Code]

View 1 Replies


ADVERTISEMENT

Create An Application That Calculates The Total Cost?

Apr 26, 2011

Create an application that calculates the total cost of a stay in a hotel in the North Carolina mountains. The application should accept the following in terms of input:Month of Check in Length of Stay (in Nights) Number of Persons Room Service Charges Phone Charges Other Charges If the check in occurs in November-March the rate is $89/night. April-August is $99/night and September-October is $109/night. $10/night should be added if more than 2 people are in the room. More than 4 people are not allowed in the room, and a traveler can only request 1 room. A 15% tax should be added to the room rate and 10% tax added to all room service and other charges. No tax will be added for phone charges.

The program should use a function to calculate the total charges for the visitor's stay and output it to a label. There should be buttons or menus to calculate the total, clear the form, and exit the application.At least one of the button should call a sub procedure which performs its function. I don't understand how to set this program up and I'm not sure what it means.

View 4 Replies

Create Application That Calculates The Occupancy Rate For The Hotel?

Jul 6, 2011

The program is a hotel occupancy form The Hotel has eight floors and 30 rooms oneach floor. I'm supposed to create aapplication that calculates the occupancy rate for the hotel. Theoccupancy rate is the percentage of rooms occupied, and may becalculated by dividing the number of rooms occupied by the number ofrooms. For example, if 18 rooms on the first floor are occupied, the occupancyrate is: 18/30 = .6 or 60%. The form has two out labels called totalrooms occupied and overall occupancy rate that holds two output text boxes todisplay the numbers
its only three buttons Calculate report,close, and exit Its obvious what the exit buttons issupposed to do the clear button should clear all the controls on the floor

Now the complete report button is supposedto loop and iterate eight times. Each time the loop iterates, it should displaya input box for one of the hotel floor. The input box should ask the user asksthe user the user to enter the number of rooms occupied on each floor. As theuser enters a value for each floor, the loop should calculate the occupancyrate for that floor and display the information for that floor in a list box.When the number of occupied rooms has been entered for all floors theapplication should display total number of rooms occupied an overall occupancyrate for the hotel. (the hotel has a total of 240 rooms total)

[code]...

View 6 Replies

Code Total Cost To Give Pound Sign With Total Cost At Moment When Total Comes Up

Jun 7, 2010

How do I code the total cost to give me a pound sign with the total cost at the moment when the total comes up for an example it gives me 3.6 when I need it to show £3.60 here is the code I have so far. [code]

View 2 Replies

VB 2008 Code The Calculations For A Pocket PC Application That Calculates The Cost Of A Cell Phone Bill?

Feb 19, 2010

I'm having trouble figuring how to code the calculations for a Pocket PC application that calculates the cost of a cell phone bill. From a Pocket PC the user should enter the number of minutes used during the past month, in order to calculate the cost of the cell phone bill. The plan allows 300 minutes for $29.95 per month. For each minute over 300 the cost is $0.17 cents per minute. Tax and Fees are $4.85 a month.

1. User enters the number of minutes used during the past month.

2. Based on plan rate of 300 minutes for $29.95 and 17 cents for each minute over 300 calculate the cost of the bill including the fixed cost of $4.85.

3. The user must be able to initiate the calculation and display the individual charges and the total cost of the cell phone bill.

4. The user should be able to clear the number of cell phone minutes, the individual charges and the bill total

If negative number is enterd for the cell phone minutes, the user should be advised and asked for a valid entry If non numeric value entered for the cell phone minutes, or if left blank the user should be advised and asked for a valid entry.Application is deployed on the Pocket PC emulator built in VS 2008

Enter # of Minutes ________ (user enters)
Regular Minutes Charge ___ (29.95)

[code]....

View 1 Replies

Program Which Calculates Cost Of Spent Electric Energy For A Number Of Days

May 12, 2010

I am making a program which calculates the cost of (Let's say) Spent Electric Energy for a number of days,defined by the user..I have 2 Date Time Picker and x (The average energy spent in a day) where x must be an integer and it is defined by the user x * (DateTimePicker2.Value - DateTime Picker1.Value) = y (The value to be paid for a number of days)

View 4 Replies

Listbox Total Cost Per Item?

Mar 30, 2010

I'm have successfully did a shortcut "+" and "-" button to increase and decrease the qty ordered. But by doing so, i now have problem tabulating the cost for each item. Below is the print screen for my application. You will realised that the Lamb tandoori which is going for $3 cost only $21 after increasing the quantity ordered using the "+" button.In addition, i have created different list boxes for different food categories.Each category's food items is selling at the same price.

<img src "http://img521.imageshack.us/img521/6144/prob.png" />

View 1 Replies

Total Cost Button Won't Work?

Jan 15, 2012

When i run the program and click the cost button, it only returns a value of £0.00 for insurance cost and total cost.

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCost.Click
Dim Cost As Double

[Code]......

View 4 Replies

Calculate The Total Cost Of A Parking Garage ?

Jun 21, 2010

I have a class assignment where i have to calculate the total cost of a parking garage from hours but i have to do it with a method function. So this might be a stupid question but can you read the user input values from a textbox in the function itself or do they have to be read in and recalled from the Private Sub Button1_Click section?

View 8 Replies

Code A Label To Show The Total Cost?

May 31, 2010

I have a assignment and I have got to do the total cost and put the total in a label, here is the code. Select Case pizza1

[Code]...

View 10 Replies

Accumulator - How To Update Total Cost After Every Item Selected

Aug 4, 2011

How to update the total cost after every item is selected and the user clicks enter...

Private Sub calcbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calcbutton.Click
Dim amount As Double
Double.TryParse(amounttextbox.Text, amount)
Dim total As Double
[Code] .....

View 1 Replies

Calculate The Total Cost For Gas For A Chevy And A Buick On A Form?

Feb 19, 2012

I'm trying to calculate the total cost for gas for a Chevy and a Buick on a form. The total miles is 21 for city and 33 for freeway. I'm also putting in the mpg for each, for city and freeway. How would I set up the labels to display the right amount? Do I use If Then statements?

View 9 Replies

Using Loop - Showing Total Cost And Adding Indexes Together

May 5, 2009

I have a class project that I have been working on for a while, and I can't figure out how to add each cost from lstCosts together to show a total cost of the selected workshops in lblTotalCost. Using the current loop that I have, it only adds the last cost in lstCosts. Is there a way to add the indexes together?

Code:
Public Class Form1
' The registration fee for each workshop
Const intSTRESS As Integer = 595 ' handling stress
Const intMANAGEMENT As Integer = 695 ' time management
Const intSKILLS As Integer = 995 ' supervision skills
[Code] .....

View 1 Replies

Listview To Count The Total In The Header Colums Called Cost?

Jan 29, 2012

How would i get this to work on a listview to count the total in the header colums called Cost.

This is a code for DataGridView how do i get it to work in listview?.

code
Dim index As Integer = 1 'column index
Dim total As Single = 0.0F

[Code].....

View 8 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

Computing Cost - Cost Is Displayed Instead Of An Accurate Cost ?

Sep 17, 2010

I am running into trouble with some code I am doing for an assignment. The section within the apostrophes (If Then Else) is the section that I am having trouble with. When the user selects a seat type and then clicks the compute button, the wrong cost is displayed instead of an accurate cost.

Option Strict On
Public Class frmTickets

Private Sub btnComputeCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnComputeCost.Click
Dim intNumberOfTickets As Integer

[CODE]....................

View 6 Replies

Translating Decompiled Code - Function That Accepts An Item Name Its Cost And Its Quantity

May 6, 2011

I was wondering if someone could translate this code into a more understandable code. It is suppose to be a function that accepts an item name its cost and its quantity. and adds one more array element to ."items" variable and assigns the given name and cost and quantity.

Public Sub AddItem(ByVal strName As String, ByVal dblCost As Double, ByVal intQuantity As Integer)
Me.items=DirectCast(Utils.CopyArray(DirectCast(Me.items,Array),New Purchase(me.itemsCount + 1)-1){}),Purchase())

End Sub

This is the translation i made but i don't think it is correct.

Public Sub AddItem(ByVal strName As String, ByVal dblPrice As Double, ByVal intQuan As Integer)
Dim items As Purchase() = Me.items
Dim itemCount As Integer = Me.itemsCount
For itemCount = 0 To items.Length - 1

[CODE]...

View 3 Replies

PMT Function - 20% Down Payment 2.5% Closing Cost Cash Required To Close The Loan Principal And Interest

Feb 8, 2008

I need to code this with 20% down payment 2.5% closing costcash required to close the loan Principal and interest can be computed by call the PMT function, terms 30 years (360 months 2.5% Property tax 0.8% insurance monthly payment is equal to the sum of the principal and interest, property tax and insurance.

I have attached my project.

I am not getting any input from my teacher and the book does not say much about this

Attached File(s)

View 14 Replies

Create An Application That Calculates And Displays A Customers Bill?

Apr 21, 2010

Using VB2008 I need to create an application that calculates and displays a customers bill.Business customers must have one connection.

Heres the data

Residential customers:
Processing fee: $4.50
Basic service fee: $30
Premium channels: $5 per channel

[code]....

View 8 Replies

Create An Application That Calculates Body Mass Index?

Nov 10, 2009

I am working in Visual Basic 2008 and am trying to create an application that calculates body mass index. I have the entire form complete as well as much of the source code, but I am having trouble creating the code for input validation. On the form I have a text box for entering weight and a text box for entering height, which are both used to calculate the body mass index. Therefore, both text boxes input information cannot be negative or an illegal character ( $, @, !...) The input validation is supposed to present a Message Box that displays something along the lines of "Please enter numeric values" when input values are illegal characters "Please enter a positive number" when input values are negative "Invalid Entry" when input values equal 0

Here is my code:

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
' Declare local variables

[Code].....

View 3 Replies

Create An Application That Calculates Registration Fees For A Conference

Apr 24, 2009

create an application that calculates the registration fees for a conference. The general conference registration fee is $895 per person. The is also an optional opening night dinner with a keynote address for $30 per person. additionally, the optional preconference workshops listed in table 7-16 are available. [code] When the user clicks the select conference options button, it should display the conference option form the conference options allows the user to select the regular conference registration, the optional opening night dinner, and an optional preconference workshop.(the user cannot register for the optional events, however, without selecting the conference registration of $895.) when the close button is clicked the conference form should be removed form the screen and the total should apper on the main form. [code]

View 1 Replies

Create An Application That Calculates The Occupancy Rate For Each Floor?

Oct 29, 2009

The hotel has 8 floors and 30 rooms on each floor. Create an application that calculates the occupancy rate for each floor, and the overall occupancy rate for the hotel. The occupancy rate is the percentage of rooms occupied, and may be calculated by dividing the number of rooms occupied by the number of rooms.When the user clicks the "Complete Report" button, a loop should execute and iterate 8 times. Each time the loop iterates, it should display an input box for one of the hotel's floors. The input box should ask the user to enter the number of rooms occupied on that floor. As the user enters a value for each floor, the loop should calculate the occupancy rate for that floor, and display the information for that floor in the list box. When the number of occupied rooms has been entered for all the floors, the application should display the total number of rooms occupied and the overall occupnacy rate of the hotel.I have some of the code but I'm not sure which way to go now!

[Code]...

View 14 Replies

Created An Application That Calculates And Displays The Quarterly Payment?

Sep 27, 2009

I have created an application that calculates and displays the quarterly payment on a loan but when i run the application the paymnet amount is showing with () around the amount I can't figure it out.

[Code]...

View 3 Replies

Creating An Application That Calculates Render Times For Maya?

Sep 21, 2010

I'm creating an application that calculates render times for Maya. I kinda got bored of coding all the technical stuff so I started to mess around with the interface. I'm trying to create a combobox color picker.

View 5 Replies

Make A Form Stay On Top Of Application?

Oct 15, 2011

im looking for code that will let me keep a form on top with in my application, Like form2.vb will stay on top of my form1.vb, How can i do this i searched the forum and could not find what i was looking for.

View 1 Replies

Date Function That Calculates The Date Based On The Number Of Months?

Sep 15, 2009

I am using VB.NET. Is there a date function that calculates the date based on the number of months I have given?

for example, if i say July 2009 and looking for 10 months back, it should return Sept 2008.

View 4 Replies

.net - My SUM Function - Rdlc - Custom Code -total?

Nov 6, 2011

I would like to pass a value and add to it with the previous value thats what I want.The below code doesn't work...I can't understand the problem..Actually its for rdlc - total purpose I need it.My Code

public MyValue as Decimal=0
public Function AddToSum(ByVal quantity as Decimal) as Decimal
MyValue=AddToSum+quantity
AddToSum=MyValue
return AddToSum

[Code]...

View 1 Replies

Hotel Occupancy FormHelp?

Jun 22, 2010

it's not perfect but, I am terrible when it comes to calculations... what am I doing wrong? ;-;

' This procedure calculates and displays each floors occupancy rate.

Dim intCount As Integer ' Loop counter
Dim decoccupancy As Decimal ' occupancy rate

Calculate the occupancy rate for each floor, the total of all occupancy rates , and the total rooms occupied.

[code]...

it's telling me to divie the number of rooms by the occupied rooms... 18/30 = .6 or 60% and the hotel has 240 rooms

View 8 Replies

Percentage / Discount For Hotel Quote Form

May 1, 2011

I made a hotel quote form where I want to add a discount box where the user can enter a percentage discount off the total price. What is the code to do that? [code]

View 11 Replies

Payroll Calculator - Program Must Calculate And Display The Total Pay In The Total Pay Label

Oct 6, 2010

The pay rates for the project are:

a. Level 1 - $10.00
b. Level 2 - $12.00
c. Level 3 - $14.00
d. Level 4 - $16.00
e. Benefit Deduction Rate - 0.10
f. Overtime Factor - 1.5

For ease of program maintenance, all of the above rates and factors must be stored in module level constants. All references to pay rates in the program must refer to the module level constants.

When the Calculate button is clicked:

a. The value in the Hours text box must be validated to insure that it is numeric value greater than zero.

1. If the value is not valid, a message box must appear as shown below and the user must be offered the option to continue processing or quit the program.

2. If the user chooses to continue processing, the focus must be set to the Hours text box.

3. If the user chooses to quit, the program must close immediately.

b. If the value is valid, the program must calculate and display the total pay in the Total Pay label.

1. The pay rate is determined by which Job Grade radio button is checked.

2. For hours less than or equal to 40, the total pay is the hours times the pay rate.

3. For hours greater than 40, the total pay is 40 hours times the pay rate plus the hours in excess of 40 hours times the pay rate times the Overtime Factor.

4. If the Full Time radio button is selected, the total pay must be reduced by the Benefit Deduction Rate.

5. The value displayed in the Total Pay label must be formatted with a dollar sign and with two decimal
places.

6. The focus must be set to the Hours text box.

Why i get an error when i try to run this code

Code:

Also the message box, both yes and no close the program.....

View 10 Replies







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