Question

IN Visual Basic please share also Desiger.vb

Assignment 10 Assignments Guidelines This assignment has ONE question. Make sure you answer it and include comments. You willGuidelines: 1. When the user enters his/her name, it must be in LAST NAME, FIRST NAME format 2. You must include a tool tipBill Calculator Ball Calculator Please enter your Full name LAST NAME. FIRST NAME Please enter your LAST NAME. FIRST NAME FulBill Calculator Please enter your LAST NAME. FIRST_NAME Full name O Graduate Student Undergraduate Student 100 Total Bill (Be

Assignment 10 Assignments Guidelines This assignment has ONE question. Make sure you answer it and include comments. You will lose-10% ofyour grade in this assignment if the comments are missing Bill Calculator You need to design an application that user can enter his/her name, select their level: graduate vs. undergraduate, then they would enter the bill amount. See picture belovw Bill Calculator Please enter your Full name O Graduate Student Undergraduate Student Total Bill (Before discount) Calculate
Guidelines: 1. When the user enters his/her name, it must be in LAST NAME, FIRST NAME format 2. You must include a "tool tip" that display the format for the user 3. Based on the name the user entered, your application must greet the user using their FIRST name. 4. If the user is a graduate student he/she get a 20% discount, if he/she is Undergraduate they receive a 15% discount. Your application must generate a 4-digit random receipt number 9) 5. You MUST use a function or a procedure to find each of the following: 6. First name Student level Bill amount after discount Random receipt number a. b. c. d. Below are EXAMPLES of what the output would look like based on the user input. Pay extra attention to the highlighted parts.
Bill Calculator Ball Calculator Please enter your Full name LAST NAME. FIRST NAME Please enter your LAST NAME. FIRST NAME Full name O Graduate StudentUndergraduate O Graduate Student ⓔ Undergraduate Student Total Bill (Before discount) 100 Total Bill (Before discount) 100 Hello FIRST NAME Your b $85.00 Your receipt number is 7052 Hello FIRST NAME. Your $85.00 Your receipt number is 7052 bill after your Undergraduate discount is: IS. Calculate Calculate Here is another example with the same input, notice how the random number changes but it continues to have 4 digits
Bill Calculator Please enter your LAST NAME. FIRST_NAME Full name O Graduate Student Undergraduate Student 100 Total Bill (Before discount) Hello FIRST NAME Your bill after your Undergraduate discount is: $85.00 Your receipt number is 5669 Calculate
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below is the solution:

code:

Public Class frmBillCalculator
    Private Sub frmBillCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label1.Text = "Please Enter your" & vbNewLine & "Full name" 'set the label text
        Label1.Font = New Font(Label1.Font, FontStyle.Bold) 'set the font to bold

    End Sub

    Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
        Dim str As String = txtName.Text
        Dim str2() As String = Split(str, ",") 'split string
        Dim discount As Double
        discount = txtBill.Text * 0.15 'discount percent
        Dim Random As New Random()


        If rbtnGraduateStudent.Checked Then 'if graduate button selected
            discount = txtBill.Text * 0.15 'discount percent
            lstBill.Items.Add("Hello " & str2(1)) 'take second index of string
            lstBill.Items.Add("Your bill after your " & rbtnGraduateStudent.Text & "iscount is:")
            lstBill.Items.Add(txtBill.Text - discount).ToString("$0.00")
            lstBill.Items.Add("Your receipt number is: " & Random.Next(1000, 9999))
        ElseIf rbtnUndergaduateStudent.Checked Then 'if undergraduate button selected
            discount = txtBill.Text * 0.2 'discount percent
            lstBill.Items.Add("Hello " & str2(1)) 'take second index of string
            lstBill.Items.Add("Your bill after your " & rbtnGraduateStudent.Text & "iscount is:")
            lstBill.Items.Add(txtBill.Text - discount).ToString("$0.00")
            lstBill.Items.Add("Your receipt number is: " & Random.Next(1000, 9999))
        End If
    End Sub
End Class

output:

Bill Calculator Please Enter your Full name Nehal Ahmed OGraduate StudenO Undergaduate Student Total Bill (Before discount) 1

Add a comment
Know the answer?
Add Answer to:
Assignment 10 Assignments Guidelines This assignment has ONE question. Make sure you answer it an...
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
  • In this assignment, you will be creating a program that requires a secret code to “unlock.”...

    In this assignment, you will be creating a program that requires a secret code to “unlock.” The program should first welcome the user and ask the user to input his/her name. Then the program will greet the user using the entered name. In order to “crack the code,” the user must input three integer numbers which satisfy the following conditions: The first number must be the number 3. The second number can either be the number 1 or be between...

  • CS 1050 Homework Assignment 2 – SUMMER 2017 DUE Friday, July 7th at 5PM WARNING –...

    CS 1050 Homework Assignment 2 – SUMMER 2017 DUE Friday, July 7th at 5PM WARNING – Technology failing is not an excuse to turn in your assignment late. START EARLY so you will have time to fix problems before the deadline. Directions: Complete the following homework assignment using the description given in each section. Purpose: The Tuition.c program will be used to Read in the Student ID (an integer value) and use an array search see if the ID is...

  • Please make it sure your answers are meet what question needs with details I do not accept (copy ...

    Please make it sure your answers are meet what question needs with details I do not accept (copy / post) Using NetBeans IDE and write a CLI application that uses the BufferedWriter to write data to the file named "CustomerList.txt". =========================================================================== The application should follow this information A. Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. Save the program asWriteCustomerList.java.When you...

  • you must implement public class Student by following the instructions as follows exactly. You may reference...

    you must implement public class Student by following the instructions as follows exactly. You may reference Chapter 7 for the similar examples to get the ideas and concepts. Each student must have the following 5 attributes (i.e., instance variables): private String   studentID ;              // student’s ID such as                         1 private String lastName   ;                         // student’s last name such as              Doe private String firstName ;             // student’s first name such as            John private double gpa...

  • *This question was posted earlier but I want to make sure my code differs from the...

    *This question was posted earlier but I want to make sure my code differs from the other answer* CS50 Assignment 3 and Assignment 4 (Both Due By Sunday March 29 11:59 PM) Assignment 3: Bank Application In a recent lecture, we discussed getting input from the user by using the scanf() function. For your reference, I have included a simple example of using scanf() below: scanf() example: #include int main(void) { int number; printf("Enter a number: "); //prompt the user...

  • Task #1 Create a program that: 1. Has a comment in the JavaScript code with your...

    Task #1 Create a program that: 1. Has a comment in the JavaScript code with your name and student number 2. Asks the user for their first name with a pop-up prompt screen. Explorer User Prompt Script Prompt: ок Enter your first name: Cancel Joel 3. Asks the user for their last name with a pop-up prompt screen. Explorer User Prompt X Saript Prompt: ок Enter your last name: Cancel Smith 4. Performs string concatenation to combine their first and...

  • home work

    a.      You must use proper error and exception handling (try, catch) in the application. [5 marks] b.      Accept the users first and last name store in two SEPARATE variables. [2 marks] c.      Accept two numbers:                                i.     validate that the user has entered numbers for each input. [3 marks]                               ii.     For invalid numbers ask the user to re-enter the number [2 marks]                               iii.     If the user enters a number greater than 500 throw an exception, display a message that numbers should...

  • Modify your program from Assignment # 7 part b (see below for code) by creating an...

    Modify your program from Assignment # 7 part b (see below for code) by creating an interactive GUI application that displays the list of the orders read in from the file (create a data file using your CreateBankFile.java program which has a least 10 bank account records in it and include it with your submission) and the total number of bank accounts. When your program starts it will first read the records from the Bank Account file (AccountRecords.txt) and creates...

  • Programming Assignment #2 EE 2372 MAKE SURE TO FOLLOW INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS...

    Programming Assignment #2 EE 2372 MAKE SURE TO FOLLOW INSTRUCTIONS CAREFULLY, IF YOU HAVE ANY DOUBTS PLEASE EMAIL ME! This programming assignment will just be a small extension to programming assignment 1. In the first assignment each of the functions could only take a predefined number of inputs. This time the objective is to be able to complete these functions with any amount of inputs. The user will pass arguments through the command line (this means you will have to...

  • Hello Please, don't answer with your handwriting, Thank you.. This question is related to java language...

    Hello Please, don't answer with your handwriting, Thank you.. This question is related to java language Write a full Java program that: 1. Generate an integer random number between 0 and 6. 2. Then make a loop that keeps asking the user to guess the generated random number. If the user input is not equal to the generated random number, then print, "Try again" and allow the user to input another guess until the user guess correctly 3. If the...

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