Hi,
I have been practising some OOP and have encountered this error" cannot resolve symbol - variable MyInput"
I wonder wat's wrong...here is part of my code:
public class BorrowMortgage
{
//Main method
public static void main (String[] args)
{
//Create one borrower
Borrower borrower = new Borrower( );
//Enter the information for the borrower
//1. Enter name
Name name = new Name ( );
System.out.print("Enter first name: ");
String firstname = MyInput.readString ( );
name.setFirstname(firstname);
System.out.print("Enter mi: ");
String mi = MyInput.readString ( );
name.setMi(mi);
System.out.print("Enter last name: ");
String lastname = MyInput.readString ( );
name.setLastname(lastname);
//2. Enter address
Address address = new Address ( );
System.out.print("Enter street: ");
String street = MyInput.readString ( );
address.setStreet(street);
System.out.print("Enter city: ");
String city = MyInput.readString ( );
address.setCity(city);
System.out.print("Enter state: ");
String state = MyInput.readString ( );
address.setState(state);
System.out.print("Enter zip: ");
String street = MyInput.readString ( );
address.setZip(zip);
//3. Enter mortgage information
Mortgage mortgage = new Mortgage ( );
System.out.print ("Enter annual interest rate (i.e 7.25): ");
double annualInterestRate = MyInput.readDouble( );
mortgage.setAnnualInterestRate(annualInterestRate);
System.out.print("Enter number of years:");
int numOfYears = MyInput.readDouble ( );
mortgage.setLoanAmount (loanAmount);
//4. Set values to the borrower
borrower.setName(name);
borrower.setAddress(address);
borrower.setMortgage(mortgage);
//Print mortgage information
System.out.print(borrower.toString( ) );
}
}
can anybody help me? thanks!!