Question
in C# An employee has a name, a payrate, and an hoursWorked. The pay amount can be calculated by multiplying payrate and hoursWorked. Create a
in C#
An employee has a name, a payrate, and an hoursWorked. The pay amount can be calculated by multiplying payrate and hoursWorked. Create a class called Employee with three fields (name,payrate, and hoursWorked). the data type for the name should be a string. The data type for payrate and hoursWorked should be double. The class should have a method called GetPayAmount that returns pay amount. The return data type must be double. The class should also include properties, constructor(s), and the ToString method. The ToString method must display employee name and pay amount. The class must be in its own cs file. Then, inside the Main method of the Program class, demonstrate the Employee class by instantiating two employee objects with made up data. One of the employees must be you. Next print both employees.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started