Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Professional Athletes often hire other professionals to help take care of matter

ID: 3676478 • Letter: P

Question

Professional Athletes often hire other professionals to help take care of matters for them. We will group them in four categories: Lawyers, Personal Assistants, Agents, and Trainers. They all get paid a percentage of the athlete's total yearly salary. Lawyers - 10%, Personal Assistants - 3%, Agents - 7%, and Trainers - 5%.

Prompt the user to enter the athlete’s salary for the year (ensure that the entered value is positive). The user should then enter the name and category of each of the hired professionals. The athlete should be able to hire as many professionals in each category as he/she wants, even if it is more than he/she can afford. Based on the category, calculate the amount that each professional should be paid. After all data has been entered, print the names of each professional hired, how much each is being paid, the total amount the athlete paid, and how much the athlete has left.                                          

visual basic 2012 in visual studio as a windows application

Explanation / Answer

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim asal, law, peras, agent, train As Double
asal = Convert.ToDouble(TextBox1.Text)
law = asal * 10 / 100
peras = asal * 3 / 100
agent = asal * 7 / 100
train = asal * 5 / 100

Label1.Text = TextBox2.Text
Label4.Text = TextBox5.Text
Label6.Text = TextBox7.Text
Label8.Text = TextBox9.Text

Label2.Text = law
Label3.Text = peras
Label5.Text = agent
Label7.Text = train


End Sub
End Class

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote