Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi can someone trasnlate this to Java language that can be used in Net Beans class Professional(): def __init__(self, name, ptype): self.name = name.title() self.ptype

Hi can someone trasnlate this to Java language that can be used in Net Beans

class Professional(): def __init__(self, name, ptype): self.name = name.title() self.ptype = ptype if ptype.lower() == "lawyer": self.salary = 0.1 elif ptype.lower() == "personal assistant": self.salary = 0.03 elif ptype.lower() == "agent": self.salary = 0.07 elif ptype.lower() == "trainer": self.salary = 0.05 else: self.salary = 0.0 if __name__ == "__main__": professionals_hired = list() athlete_salary = float(input("Your Salary? ")) n = int(input("Number of professionals? ")) for i in range(n): professional_name = input("Please enter name of professional ") professional_type = input("Please enter type of professional ") professionals_hired.append(Professional(professional_name, professional_type)) total_salary_paid = 0 for i in professionals_hired: prof_sal = i.salary * athlete_salary print("Salary to", i.name, "=", prof_sal) total_salary_paid += prof_sal print("Total Salary Paid = ", total_salary_paid) print("Left with Athlete = ", athlete_salary - total_salary_paid)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

Define marketing concepts.

Answered: 1 week ago

Question

1 what does yellow colour on the map represent?

Answered: 1 week ago