It's Chinese Take Out Time

Google




Powered by Blogger

Subscribe to
Posts [Atom]

Countdown to ATPL

I Love Chinese

My Photo
Name:
Location: Singapore

An ordinary guy hoping to live life to the fullest. Awaiting the bigger things in life.

View My Auctions

Bring on the Dim Sum



We Fumble With Chopsticks

  • Aimin
  • Jing Fang
  • Caryn
  • Weiling
  • Fen
  • Peggy
  • Wenyan
  • Angie
  • Lynn
  • Grace Koh
  • Suan Siong
  • Alicia
  • Caryn
  • Kai Jie
  • Diana
  • Ziwei
  • Pan Hui Ru
  • Snufflezz
  • Sarah
  • SG Fairy
  • Black High Heels
  • Lyn.c(SG Newscaster)
  • Justin
  • Kanny
  • Cordelia
  • Jocelyn
  • Su Feng
  • Felicia Chin
  • SugarJocelyn
  • Jessica Tan
  • Huilin
  • Cindy
  • Weiling
  • Kenny
  • Eelyn Kok
  • Che Yin
  • Tampines 1
  • Camemberu
  • Fan Wenqing
  • Yu-Kim
  • Karen Ashley Ng
  • DarDar&KaiKai
  • Jeneen
  • Yiting
  • Clarice
  • Reiee Koh
  • Kim Ho Desiree
  • Jenny
  • Peggy Heng
  • Silver Ang
  • Kimberly Wakerman
  • Kimberly Haley Wang
  • Katherine Yang
  • Rebecca Lim
  • Mei Ting
  • Rachel Wong
  • Hazel Low
  • Ivy SMJ
  • Miyake
  • Cherlyn Tan
  • Soh Peishi
  • Maybeline Sim
  • Janice Goh
  • Serene Heng
  • Catherine Liew
  • Fiona Ryou
  • Jessica TippyTapp
  • May
  • Ziyi Kuek
  • Gwen Teo
  • Melissa Celestine Koh
  • Miss Tam Chiak
  • Elin Wong
  • Nicole Ann Leong
  • Claires Flair
  • Yina Goh
  • Lucinda Zhou
  • Jolene Zhou
  • Sim Peiling
  • Ziying
  • Seokyee
  • Lim Junying
  • Karen Yun
  • Zoe Raymond
  • Joslina Ophelia
  • Yee Kit
  • Shine Koh
  • Ee Xuan
  • Ang Geck Geck
  • Mayne Lim
  • Rachel Lim
  • Emily Chia
  • Mio Lin
  • Emmie Neo
  • Ivy Goh
  • Huirong
  • Apple Yap
  • Cordelia Low
  • Elaine Jasmine
  • Sophia Berries
  • Shenny Yang
  • Lim Yanntorng
  • Amelia Wong
  • Pamela Lua
  • Xueqi
  • Freda Poh
  • Yilin Goh
  • Kayla Wong
  • Honey Lim
  • Tobey Cline
  • CXGE90
  • Scribbles
  • Hoongji
  • Grocery List
  • We Like Chinese Too


    Chinese Cuisine

    Blogskins.com
    Liverpool FC
    SoccerNet
    Aviation
    Automotive

    Adventures With Chopsticks

    <

    Fortunes Can Be Funny

    Web Counter

    Monday, September 04, 2006

    Java, Java & more JAVA!!

    For the weekend, I've been dreaming java, eating java, speaking java n living with java. I had this lab assignment which I have to hand in by this Wednesday. So i started doing it on Saturday. Well, it's supposed to be an EASY exercise, but heck, it took ne quite a while to write the codes.

    No time for leisure, no time for my dear MQ, all my time for JAVA!! It makes me wonder how the hell Bill Gates wrote the formidable Windows95 programme more than a decade ago. *Salute*

    Here's a sample of one of the Java programmes i wrote:

    /**
    * CS1101 Lab #1, Exercise 3: Invest.java
    *
    * This program computes the amount gained after N years given
    * the principal amount (P), interest rate (R) and number of
    * years (N), based on compound interest.
    *
    *
    */

    import java.util.*;
    import java.text.*;
    import javax.swing.*;
    import java.lang.*;



    public class Invest {

    public static void main(String[] args) {

    // fill in your code here

    double p;

    double r;

    double n;

    Scanner t1 = new Scanner(System.in);

    p = t1.nextDouble();
    r = t1.nextDouble();
    n = t1.nextDouble();

    double sum0, sum1, sum2, sum3, sum4;

    DecimalFormat x = new DecimalFormat(".00");

    sum0 = r/100;
    sum1 = 1 - Math.pow(sum0, (n+1));
    sum2 = p*sum1;
    sum3 = 1 - (r/100);
    sum4 = sum2/sum3;





    System.out.println("Enter principal amount: " + p);
    System.out.println("Enter interest rate : " + r);
    System.out.println("Enter number of years : " + n);
    System.out.println("Amount = $" + x.format(sum4));





    }

    }


    Yeah, this is considered simple. Haha.. I wonder what's waiting for me in the later phase of my course. It's so late n my brain is still active with all the codes floating around in my brain. I miss MQ though. Busy Schedule put both of us away from Wednesday till Saturday night. We never got separated this long, so much so that she became pretty emotional when we met on Sat night. 4 more days before we hit the quarter year mark...

    I'll go crash now...

    WaiZai fumbled with chopsticks @ 9/04/2006 01:31:00 am | 1 has delicate hands

    1 has delicate hands
    <$BlogItemAuthorNickname$> had a patient mind and asked...

    Oh I took that module last time. I hate java...

    What major u took?

    9/08/2006 12:03 pm  

    Post a Comment

    << Go Back and Watch me Fumble