Start Main( ) or btnRun_Click( )
Create a RaceCar object
Set the car name to “Fast One”
Set the x coordinate to 200
Set the y coordinate to 100
Call the car’s Move( ) method and show the resulting message
Display a blank line to separate the two object results
Create an Employee object
Set the employee’s first name to “Joe” and last name to “Student”
Set the phone to “555-1111”
Set the annual salary to 74395.11
Call the employee’s CalculatePay( ) method and display the weekly pay amount
Stop
Add the following code to the Move( ) method of the RaceCar class:
x = x + 5; // same as x += 5;
return "Current Position: " + x;
Add the following code to the CalculatePay( ) method of the Employee class:
return annualSalary / 52.0;
I need help with program. this is what I have so far:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Week2Lab
{
class Program
{
static void Main(string[] args)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Week2Lab
{
public class Employee
{
private string firstName;
private string lastName;
private char phone;
private double annualSalary;
public Employee()
{
string firstName = "Joe";
string lastName = "Student";
char phone = "555-1111";
double annualSalary = 74395.11;
}
public string FirstName
{
get { return firstName; }
set { lastName = value; }
}
public string LastName
{
get { return lastName; }
set { lastName = value; }
}
public char Phone
{
get { return phone; }
}
public double calculatePay
{
get
{
return annualSalary / 52.0;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Week2Lab
{
public class RaceCar
{
private string name;
private int x_coordinate;
private int y_coordinate;
public RaceCar()
{
//Set the car name to “Fast One”
name = "Fast One";
//Set the x coordinate to 200
x_coordinate = 200;
//Set the y coordinate to 100
y_coordinate = 100;
}
public void Move()
{
Console.ReadLine();
}
public string CurrentPosition()
{
}
}
}