This is what my lab says to do
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
This is how I did it and I am getting errors
using System.Text;
namespace Lab2
{
public class Main
{
//Create a RaceCar object
public static void RaceCar();
//Set the car name to “Fast One”
string name = "Fast One";
//Set the x coordinate to 200
int x = 200;
//Set the y coordinate to 100
int y = 100;
//Call the car’s Move( ) method and show the resulting message
public void Move();
//Display a blank line to separate the two object results
Console.ReadLine();
//Create an Employee object
public void Employee();
//Set the employee’s first name to “Joe” and last name to “Student”
string fname = "Joe";
string lname = "Student";
//Set the phone to “555-1111”
string phone = "555-1111";
//Set the annual salary to 74395.11
double AnnualSalary = 74395.11;
//Call the employee’s CalculatePay( ) method and display the weekly pay amount
public void CalculatePay();
}
}
Anyone know what I am doing wrong here?