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)
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.
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]
I am building a program that calculates the number of books by points.Ex: 1-3 books read are worth 10 points, 4-6 are worth 15 and > 6 are worth 20. The issue I'm having is getting it to calculate the the first 3 books, the 2nd 3 books and then the > 6.Ex: User inputs 8 books read. It should display 115 in the label.
1. I'm using an If statement (should I be) 2. Could I use a decimal for the > 6? Ex: intTotalNumberOfBooks = (intTotalNumberOfBooks * intFirst3Books) *#D
I know this is something simple and it's out of VB 101, but it is my very first programming class and my professor uses a copy paste method during class.
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)
The local car rental company rents cars for 29.95 per day with unlimited mileage. There is a refueling fee of 12.95; regardless of what the level of fuel is when the car is returned. Write a program that will permit the user to input the customer's first and last names and the number of days that the car was rented. The program should compute the total charge for the car that was rented.
I have to do this: A. using a standard window B. Using a WPF window (And I don't even know what that means) C. Using a console application
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
I have a date in the future e.g. 13/10/2008 I need to subtract the current date (today is the 28/09/2010) minus 7 days, so thats 21/09/2010 minus 13/10/2008, which would equal erm, 720 something ? But the current date won't always be 28/09/2010, obviously. I need the code for this. EDIT: When i said future I mean past :)
I'm trying to make a program that calculates the x's for you using the abc formula. Now i have made it, it gives a value of "NaN" as output. I don't know where i went wrong, so I hoped one of you could help me with it.
VISUAL BASIC 2008. Program Description: Create a program that calculates the amount of quarters, dimes, nickels, and pennies are needed from an amount of change (entered in pennies). The program should use the largest coins possible (for example, fifty cents should use two quarters, not five dimes, fifty pennies, etc.)
I don't want the code already written out, I need somebody to walk me through making a code. Also, this is my first class dealing with computer programming so all we've learned so far is declaring variables and how to label objects, the simple stuff. I'm at a loss at how to start because a quarter is worth 25 but the program is supposed to show how many quarters once a user enters the amount in cents.
Okay, that's not a big deal... I'll implement FileStreams and read bytes performing operations on them. The problem is that if I do this, the program will hang until the hashes have all been calculated. I want the program to show the hashes calculated so far and a progress bar. I know I need to implement this using threads and interrupts, but how, P.S. Any example code, simply for showing the progress of any operation, and involving a thread,
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]...
I have to write a program that calculates amount due and provides a summary or rentals.Members get 10% off. The program is to calculate the Total rental price then how much the discount is and then the total amount due. Inside a Group box called summary I need the program to display the number of customers (captured each time a member number is enentered) and the total rental income after the discount. I have the follwoing Text Boxes:
I'm trying to get, as the title says, the number of days between 2 dates. TextBox8 is set to a parsed version of the current date. The user has to enter the other date into TextBox7.Then I try to use this function that i made. The code does not work, I get an exception. I have never made a function before so I don't really know much about them. I honestly don't even know if this is possible,
I want to get number of days in a month. Here is my requirement if I am selecting month name in a combobox then I am displaying days in another combobox. Example : If I am selecting JAN in one combobox then 1 to 31 numbered bind to another combobox. If I am seleing FEB in a ombobox 1 to 28 numbers added to the combobox. I want to do this in vb.net (windows application).
Is there a method or function that I can use to get the number of days between a start date and end date? I tried using Timespan, but I was noyt able to convert the value to a string. What I am doing is I have 3 text boxes. 1 with start date value user will set using a calendar. And another with end date set using a calendar.And the 3rd text box is being used to display that difference between the two dates.
How can I calculate number of days between two dates. For example between 24/12/2009 and 29/12/2009. How can I know that how many days are there between these two dates?
Ok, say I have an application that has a setting called start. and when a button is pressed on the form, it puts a day in there or something, then the button becomes disabled. then when the application is opened 2 days (48 hours) later, the button becomes enabled for use again. How could I do this?
I'm creating a program for my workplace which stores hours worked, calculates pay and all that stuff.Problem being, the database will be accessed through the network and i want to be able to select the database from an openfile dialog on first use to locate the database. On every program start up it then would have the database location stored within the program itself.
I'm trying to create a program which will calculate the Fibonacci Sequence which calculates the numbers correctly however, there are a few problems.
1. When using a Do While...Loop the program becomes non responsive.
2. Kind of dealing with the program becoming non responsive; I am unable to stop the process by forcing the sub to Exit.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Operation.Text = "Calculating...." EStop = False
I need to write a program that calculates and displays the depreciation of a businesses assets.I need the program to read a comma-delimited input file containing the names of multiple assets, their purchase prices, the years of their purchase and the number of years that the assets are expected to be useful.I need to use this straight line depreciation formula- (purchase price / number of years of usefulness) * (current year �purchase year)
I have a datatable that stores information on employees. What i'm trying to do is use it to run a seniority list looping through the table using the current system date. The looping part i have no problem with, and the system date calculation also i know how to do. The problem call the date from the startDate column to do the calculation.
i have tried
dim sDate As date = "startdate"
but i get an error that it cannot be converted to date.
I am supost to code a program for my homework using an one-dimensional array.in the program you enter the number of the moth and it gives you how many days are in that month. and I'm just kind of lost?
on my design i have a listbox, datetimePicker and a button. how do i pick a date like for example 14 feb 2010 from the datetimePicker and click the button, then the listbox showing how many days from 1st jan 2010? should be 45days.
I know the datediff function can give the count of the number of days between two different dates, but how can I get the count of the number of business days - i.e. Monday - Friday - between two dates?
If a billing period always starts on say the 22nd of the month and ends on the 21st of the following month then all I'd have to really figure out is how many days are in the month the billing period started right? I hate working with Dates! This is what I've come up with using the idea above...Note, Dates are strings in the first column of a Listview in the format of, mm/dd/yyyy.
' get month from start of billing period (last item in LV) ' example of dates: 06/22/2011 Dim BillStartMonth = CInt(ListView1.Items(ListView1.Items.Count - 1).Text.Substring(0, 2)) ' get Year from start of billing period (last item in LV)