computer science

posted by .

I need to see if someone can help me with a c# programming problem
Create a class called employees that includes three pieces of information as either instance variables or automatic properties - a first name(type string), a last name (type string) and a monthly salary (decimal). Yor class should
hace a constructor that initializes the three values. Provide a pproperty with get and set accessor for any instance variable. Of the monthly salary is negative, the set accessor should leave the instance variable unchanged. Write a test application named EmployeeTest that demonstrates class Employee's capabilities. Create two Employee objects and display each object's yearly salary. Then give each Employee a 10% raise and display each Employee's yearly salary again.

  • computer science -

    Start from the definition of the class, assign private to instance variables, and public to methods.
    The constructor has to accept 3 arguments, two strings and one double.

    You will need accessors for each of the instance variables.

    Use the main method for testing purposes.

    You can post your code if you need help rectifying syntax or logic.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer Science-Java

    Hi, I have to write a method that returns my first name, middle initial, and last name as a single String and call the method in java. So far, I have: public class ReturnName { static String fullname(String firstname, String middleinitial, …
  2. computers

    I have just started a basic class in programming and I am totally lost. Can someone help me out?
  3. computer science

    hi i'm taking compsci and I need someone to give me some examples of these classes, thanks! You will have to write a class to represent one of the following items. Note that each class must a proper constructor even though the constructor …
  4. programming

    There are several types of room in a hotel. The HotelRoom Class of Previous Programming Problem was not specific regarding the type of room. Assume that a hotel has guest rooms and meeting rooms. Modify the HotelRoom class as follows: …
  5. programming

    a) Define a Cat class. A Cat has name. Define two constructors, one with no argument and another with the name as its argument. Initialize the name to a default value Unknown for the zero-argument constructor. b) Create a main class. …
  6. C++ Programming

    create a class called DataSet. This class will have a default constructor that is empty, but an overloaded constructor that takes an integer argument and creates a vector with that many random numbers in it. For example, if I created: …

    NEED HELP! I would like to create a class for finding the voltages of 1, 2 or even 4 batteries. The Class can be called BatteryVoltage with a default voltage value of 1.5 (AA Battery) Must allow the user to find the total voltage of …
  8. Computer Programming

    I already posted this question but I gave it a try I'm not sure if I'm on the right track: Make a util class with three methods. First method's name is add, that returns the result by adding two numbers. Second method's name is multiply, …
  9. c++

    1. Create a class called Faculty that includes three pieces of information as data members: a. a first name (type string) b. a last name (type string) c. a monthly salary (type int). They should be private. 2. This class should have …
  10. computer programming

    Create the psuedocode for an application class named Monogram. Its main() method holds three variables that hold your first, middle, and last initials, respectively. Create a method to which you pass the three initials and that displays …

More Similar Questions