IN Visual Basic please share also Desiger.vb
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:
Assignment 10 Assignments Guidelines This assignment has ONE question. Make sure you answer it an...
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 – 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 / 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 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 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 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...
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 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 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 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...