Question: Using java language programming Please follow the instructions! write a complete Java program that has two classes: M and A. M contains the main method

Using java language programming
Please follow the instructions!  Using java language programming Please follow the instructions! write a complete

write a complete Java program that has two classes: M and A. M contains the main method main: should create a object from class A. Pass the constructor of A the parmeter 100. Execute the f() method in the class A object, passing it the argument 5. f) returns a value to the mairn method. main should display this value Class A: Should have an instance variable x should have two constructors: one with no parameters; one with a single integer parameter. The former should initialize the instance variable x in class A with 77; the latter should initialize the instance variable x with the value of the parameter should have the method f). f) should square the instance variable x, divide by 7, and return the remainder of the result to main using the return statement

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!