Question

: LP 4: Assignment 4 - Penny or Nickel Challenge in visual basic 2017, I am...

: LP 4: Assignment 4 - Penny or Nickel Challenge in visual basic 2017, I am stuck need help on form and code in c++ this is for practice to get my right form and coding to be able to do my in-class assignment. The instructor said to perfect this and when we did class program we will be able to do it all. Oh hello, I am struggling on getting it right especially looping. Thank you, your answer may help me see where I'm going wrong.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Do like and comment if you have any queries.

Code to copy:

Public Class Form1

Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim no_of_days As Integer
Const decimal_Penny As Decimal = 0.01D
Const decimal_Nickel As Decimal = 0.05D
Dim Chosen_Pay As Decimal
  

If IsNumeric(Me.txtNumberOfDays.Text) Then
   no_of_days = Convert.ToInt32(Me.txtNumberOfDays.Text)
Dim decimal_Salary As Decimal = 0

If radio_Penny.Checked = True Then
   Chosen_Pay = decimal_Penny
ElseIf radNickel.Checked = True Then
   Chosen_Pay = decimal_Nickel
End If

For int_Day As Integer = 1 To no_of_days
   If int_Day = 1 Then
   decimal_Salary = Chosen_Pay
   Else
       decimal_Salary *= 2
   End If
   Next int_Day
   Me.lblAmountDisplay.Text = "Total Paid: " & decimal_Salary.ToString("C")
   Else
       Me.lblAmountDisplay.Text = "Wrong InPut"
   End If
End Sub

Private Sub ClearToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClearToolStripMenuItem.Click
   Me.txtNumberOfDays.Clear()
   Me.radNickel.Checked = False
   Me.radio_Penny.Checked = True
   Me.lblAmountDisplay.Visible = False
   Me.btnCalculate.Enabled = True
End Sub

Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
   Me.Close()
End Sub
End Class

Output Screenshot:

Add a comment
Know the answer?
Add Answer to:
: LP 4: Assignment 4 - Penny or Nickel Challenge in visual basic 2017, I am...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • for my assignment, we have to create a basic quiz on c sharp using visual studio,...

    for my assignment, we have to create a basic quiz on c sharp using visual studio, i have my questions, gotten the score calculated if answered correct or not. but in having issues with looping back to the question until answered right.

  • hi i visual basic windows form app .net how do get started for coding i am...

    hi i visual basic windows form app .net how do get started for coding i am new and have no experience i know the dim statement but i can figure out the rest is there any way to know how? example using if statements and do while loop

  • Help about c++ assignment, the due date was very soon right now

    I am still struggling to do this assignment using c++ visual studios right now, i need help before the deadlineThe questions are in the google docs and I need help now because the due date was very soon at the 30th of November 2021 so I need help as soon as possible about the program on visual studios c++ and make the program quick before the due date right now.Now I got 11 people request to get the answer on...

  • Hello, I am in Physics 102 in college and am currently in a unit on circuits....

    Hello, I am in Physics 102 in college and am currently in a unit on circuits. We are studying voltage, current, resistance, capacitance, etc. The majority of the problems we work on are out of the "Fundamentals of Physics, 9th edition" textbook. I have been using your answers to guide me in my homework, but I would eventually like to be able to have a strategy to conquer these problems on my own. Most of the time I cant figure...

  • Hello everyone! I am working on my assignment for C++ and I'm having a bit of...

    Hello everyone! I am working on my assignment for C++ and I'm having a bit of trouble on the value producing functions, I am creating a program wherein I have to input a value and I need to create a function called square value where in it will square the value I have input. I cannot seem to figure out this part. Here is the code that I have so far, and thank you for any help. I greatly appreciate...

  • I need help on creating a while loop for my Java assignment. I am tasked to...

    I need help on creating a while loop for my Java assignment. I am tasked to create a guessing game with numbers 1-10. I am stuck on creating a code where in I have to ask the user if they want to play again. This is the code I have: package journal3c; import java.util.Scanner; import java.util.Random; public class Journal3C { public static void main(String[] args) { Scanner in = new Scanner(System.in); Random rnd = new Random(); System.out.println("Guess a number between...

  • Hello I was wondering If i can get some help with a question I am stuck...

    Hello I was wondering If i can get some help with a question I am stuck on or more so a concept. Formula: z = (x-μ)/(σ ) Σ = 1.1 lbs. Μ = 4.1 lbs. Z = (7 – 4.1) / 1.1 = 2.6 =.9953 This is what I get when I input my number in a normal distribution solver online= 0.0047 My issue is when calculating the Z number it seems like it will sometimes be negative and sometimes...

  • Need some help with this assignment please. I did the other 2 sections fine but this...

    Need some help with this assignment please. I did the other 2 sections fine but this one i am having some issues with. We have a scenario where a client has emailed us. In the email response back to the client we have to do the following. 1. ID what additional documents the client needs to provide in order to do their taxes 2. ID applicable deductions and credits available for clients 3. differentiate typed of income and expenditures. MY...

  • Can you please, please help me with this assignment? I am extremely desperate and I have...

    Can you please, please help me with this assignment? I am extremely desperate and I have no idea what to do or say. Is there any way possible you could please, please, please cite a source in APA format with your answer? I would be extremely grateful to you and I appreciate your time and effort. 1) What is the meaning of sensitivity analysis, scenario analysis, and simulation analysis? 2) For example: If I want to buy a house and...

  • We can play a variation of a child's game called "What am 12" that I will call "Where am 1? (a) I am a square. The intersection of my two diagonals lies at the point (4, 4), and the l...

    We can play a variation of a child's game called "What am 12" that I will call "Where am 1? (a) I am a square. The intersection of my two diagonals lies at the point (4, 4), and the length of each of my sides is 8. My sides form horizontal and vertical lines. Where am I? Order your answers from smallest to largest x, then from smallest to largest y.) x, y) (x, y)s x, y) (x, y) (b)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT