Assignment 1 Programming
Assignment 1 Programming
java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Question1;
/**
*
* @author Nasuha
*/
public class CurrencyConverter {
return newConvertValue;
}
public void displayInfo() {
System.out.println("RM Value : ");
System.out.println("Euro Value : ");
System.out.println("Indonesian Rupiah Value : ");
}
}
testCurrencyConverter.java
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Question1;
import java.util.Scanner;
/**
*
* @author Nasuha
*/
public class TestCurrencyConverter {
public static void main(String arg[]) {
System.out.println("CURRENCY CONVERTER");
System.out.println("----------------------------------------");
System.out.println("Choose currency to be converted");
System.out.print("FROM [1:Ringgit Malaysia 2:Euro 3:Indonesian Rupiah] : ");
int choice = scan.nextInt();
Output