Array 1 & 2 Program

January 27, 2009 at 16:11 (IT-322 Java)

Array 1 Link: Doc File: (DONE)array1

Array 2 Link: Doc File: (DONE)array2

Permalink Leave a Comment

Set 2 Exercises – 3 Program

December 16, 2008 at 19:17 (IT-322 Java) (, , , , , )

set-2-trinal-11
————-
Set 2 Exercises… Naka RAR ni

Pag Click nimo ani, mudiritso ka sa Media Fire, download lang did2 diritso.
Pag ma download nimo, leave a comment para mabal.an nako! thx

Permalink 5 Comments

Set 2 Exercises Link

December 14, 2008 at 22:19 (IT-322 Java)

Set 2 Exercises Link

Pag Click nimo ani, mudiritso ka sa Media Fire, download lang did2 diritso.
Pag ma download nimo, leave a comment para mabal.an nako! thx

Permalink Leave a Comment

Loan Program — Set 2 Program No.3

December 12, 2008 at 15:24 (IT-322 Java)

/**
* @(#)loan.java
* Program Number 3
* Submitted by Neil John C. Basan
* Submitted to Mr. Rico E. Nonles
* 12.11.08
*/
import java.io.*;
import java.text.*;
public class loan
{
public static void main (String[] args) throws IOException
{
double amountLoaned, interest, yearsTopay, interestDue, amountDue;
int i;
String element = new String();
BufferedReader inputFromtheUser = new BufferedReader (new InputStreamReader(System.in));
DecimalFormat roundOff = new DecimalFormat (“#,###,###.00”);
do{
System.out.print(“Enter the Amount Loaned: “);
amountLoaned = Double.parseDouble(inputFromtheUser.readLine());
System.out.print(“Enter the Interest rate: “);
interest = Double.parseDouble(inputFromtheUser.readLine());
System.out.print(“Enter the number of years to pay: “);
yearsTopay = Double.parseDouble(inputFromtheUser.readLine());
System.out.print(“Year/sttInterest DuettAmount Duen”);
interestDue = amountLoaned*(interest/100);
amountDue = amountLoaned+interestDue;
System.out.print(” “+1+” ttt”+roundOff.format(interestDue)+”ttt “+roundOff.format(amountDue)+”n”);
for(i=2;i<=yearsTopay;i++)
{
interestDue = amountDue*(interest/100);
amountDue = amountDue + interestDue;
System.out.print(” “+i+” ttt”+roundOff.format(interestDue)+”ttt “+roundOff.format(amountDue)+”n”);
}
System.out.print(“nWould you like to try again? (y/n): “);
String firstAnswer = inputFromtheUser.readLine();
// —————————————————————-
// firstAnswer is NOT equal to “yes” and NOT equal to “y”,
// so we exit the program.
// —————————————————————-
if( ! firstAnswer.equalsIgnoreCase(“yes”) && ! firstAnswer.equalsIgnoreCase(“y”))
break;
}while (true);
}
}

Permalink Leave a Comment

Clear Screen in Java

December 12, 2008 at 14:34 (IT-322 Java)

char esc = 27;
String clear = esc + “[2J”;
System.out.print(clear);

http://forums.sun.com

Permalink Leave a Comment