Question: Please do not use static main to answer this question, Add a default constructor and a value - pass constructor to MyCar class. Write a

Please do not use static main to answer this question, Add a default constructor and a value-pass constructor to MyCar class. Write a main class in a separate Java file that creates an instance of your class from assignment 1. Use all the functions.
instead use the example below
Use this format below to answer this question
public class blah
{
private int x, y;
public blah()
{
x =1; y =2;
}
public blah(int first, int second)
{
x = first; y = second;
}
public void change_vars(int a , int b)//mutator functions
{
x = a; y = b;
}
public int get_x()//accessor functions
{
return x;
}
public int get_y()//accessor functions
{
return y;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!