Click here for AnswerPool.com Home page


Google

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Computer Resources    Visual Basic if-then

Moderators: Dwight
Go
Post
Find
Notify
Tools
Reply
  
  Login/Join 
Posted
I need help with a couple of programs. Create a program that will calculate payroll. It should check for hourly vs. salaried (a-$750, b-$1,500, c-$3,000/wk), pay scale (a-$7.50, b-$15.00, c-$30.00/hr). If the employee is hrly and works over 40hrs/wk, they get time and a half. (use if-then structures)

Create a program that will accept a classmate name and provide the following information: correct/legal first, middle, and last name; DOB, address, phone, height, weight. (use case structures)

Please help

Wildflower
 
Posts: 5 | Location: Lewis Run, Pa. US | Registered: 11-14-03Reply With QuoteReport This Post
Diamond Enthusiast

Posted Hide Post
Wildflower, that is a lot of coding, are you needing help figuring out the algorithm or is it the actual VB sequencing and/or structure? LEt me know what you need and I can help but since this is apparently for a class I don't want to write out the whole thing.
 
Posts: 5121 | Location: Native Floridian misplanted | Registered: 06-08-02Reply With QuoteReport This Post
Posted Hide Post
Kwll
It is structure and this is what I have so far but it doesn't work.
const salaryA=750
const salaryB=1500
const salaryC=3000
const HourlyA=7.50
const HourlyB=15.00
const HourlyC=30.00

Dim base as single

If salary then
If salaryA then pay 750
else
if salary B pay 1500
else
if salary C pay 3000
pay=salary C
end if
end if
end if
else
if hrs>40 then
if hourlyA then
40*hourlyA=base
It's a mess I just don't understand it. Please help if you can.

Thank you
Wildflower
 
Posts: 5 | Location: Lewis Run, Pa. US | Registered: 11-14-03Reply With QuoteReport This Post
Diamond Enthusiast

Posted Hide Post
Wildflower, when is this due? I likely won't be able to get to this until tonight sometime but can help.
 
Posts: 5121 | Location: Native Floridian misplanted | Registered: 06-08-02Reply With QuoteReport This Post
Diamond Enthusiast

Posted Hide Post
I've been wrestling with this one for a couple of days because the constraints of the project are not real clear and there are literally dozens of ways to do this one. Here is what I think you should do:


Write an If else statement to determine if the pay type is hourly or salary. Then nest in the salary statement some else if statements to determine the salary type resulting in the proper amount. You will then need an else if nest for the hourly for the same thing as salry follwoed by an if then statement for <= 40 and an > 40 parameters for each pay type. The formula for over 40 should be numTotalPay = numPay * (numHours - 40 *(1.5 * numPay)) + (numPay * 40)

Hope that helps. Let me know if still stuck.
 
Posts: 5121 | Location: Native Floridian misplanted | Registered: 06-08-02Reply With QuoteReport This Post
Diamond Enthusiast

Posted Hide Post
You may also e-mail me on my profile if you have further problems.
 
Posts: 5121 | Location: Native Floridian misplanted | Registered: 06-08-02Reply With QuoteReport This Post
  Powered by Social Strata  
 

    AnswerPool.com  Hop To Forum Categories  Computers  Hop To Forums  Computer Resources    Visual Basic if-then

© 2002-2010 AnswerPool.com
All Rights Reserved
Using This Site Means You Accept Its Terms of Service and Privacy Policy
Close Cover Before Striking
3D Glasses Required for Optimal Viewing
Now in HD and Surround Sound
Offer Void Where Prohibited by Law
There's a Bathroom on the Right
Caution - Objects May Be Closer Than They Appear
Anything You Post May Be Used Against You in the Court of Public Opinion
Notice: All Employees and Customers Are Required to Wash Their Hands and Feet Before Posting by the Board of Health
Hands and Feet MUST Be Kept Inside Vehicle at All Times



Visit DiscussionPool.com!