Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: help me plss T_T

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    My Mood
    Asleep
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help me plss T_T

    Make a program that will compute the monthly payment of a particular loan
    - make a class named loan
    - declare attributes amount loaned , duration , interest , total loaned and monthly payment
    - declare setter and getter methods for amount loaned and duration
    - create overloading constructor
    - 1st constructor is a default
    Constructor that assign 10000 to amount loan and 5 months for duration
    - 2nd constructor accept single value for amount and assign 5 months for duration
    - 3rd constructor accept 2 values for amount loan and duration
    - Declare method getInterest that accept value for duration and return the interest based on the ff condition

    Duration Interest
    5months 6months 2%
    7months 9months 3%
    10 months 12 months 4%

    - Create method getTotalloan that accept values for amount loaned , interest and duration and contain compilation (amount loan*interest)*term

    Create method getMonthlyPayment that receives value of total loan and duration , and will return the quotient of total loan/duration.

    Make a class named Costumer w/ contain the main method
    - Ask the user to input value for amount and duration and pass it into the constructor
    Compute the interest , total loan , and monthly payment using method in loan class


    use JoptionPane

    Out put

    [1] 1st constructor
    [2] 2nd constructor
    [3] 3rd constructor

    Enter choice:
    Amount loan:
    Duration:
    Interest:
    Total loan:
    Monthly Payment:




    thank you !


  2. #2
    Member Zyrion's Avatar
    Join Date
    Feb 2013
    Location
    Iowa
    Posts
    106
    My Mood
    Angelic
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default Re: help me plss T_T

    Do you have a particular question pertaining to all of those program requirements? What have you tried so far? Do you mind posting any code or pseudo-code you have completed to show you have at least put some effort into trying to complete this assignment?

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    3
    My Mood
    Asleep
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: help me plss T_T

    sorry sir what is missing in my code sir ?

    and plss can you help me about in my main method sir ?

    public class loan{
    public int amtloan;
    public int duration;
    public int interest;
    public int totalloan;
    public int mpayment;

    int duration1 = 5;
    double interest1 = 0.02;
    int duration2 = 7;
    double interest2 = 0.03;
    int duration3 = 10;
    double interest3 = 0.04;
    int a;
    int b;
    int c;
    int d;
    public int setamtloan(){
    amtloan = a;
    return amtloan;}

    public int setduration(){
    duration = b;
    return duration;}

    public int setinteresst(){
    interest = c;
    return interest;}

    public int settotalloan(){
    totalloan = a;
    return totalloan;}

    public int setmpayment(){
    mpayment = d;
    return mpayment;}

    public int getamtloan(){
    return amtloan;}

    public int getduration(){
    return duration;}

    public int getinterest(){
    return interest;}

    public int gettotalloan(){
    return totalloan;}

    public int getmpayment(){
    return (a*c)*b;}

    public loan(double a,double b){
    a = 10000;
    b = 5;
    }
    }





    import javax.swing.*;
    public class costumer{
    public static void main(String args[]){

    int x = Integer.parseInt(JOptionPane.showInputDialog

    if(x==1)
    {
    loan l = new loan(double a,double b);

    l.setamtloan();
    l.setduration();
    l.setinterest();
    l.settotalloan();
    l.setmpayment();
    l.getamtloan();
    l.getduration();
    l.getinterest();
    l.gettotalloan();
    l.getmpayment();
    }
    }
    }

  4. #4
    Member Zyrion's Avatar
    Join Date
    Feb 2013
    Location
    Iowa
    Posts
    106
    My Mood
    Angelic
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default Re: help me plss T_T

    Please wrap your code in tags in order to highlight formatting.

    [C0DE=java]
    <code>
    [/CODE]

  5. #5
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 139 Times in 134 Posts

    Default Re: help me plss T_T

    Quote Originally Posted by xsinx View Post
    ..
    and plss can you help me about in my main method sir ?
    ....
    And what about the main method in particular do you need help with? I've yet to see a specific answerable question in this thread. Please clarify your problem for us so that we can help you.

Similar Threads

  1. its about buttons events problem plss help its in jsp on netbeans
    By karan.mehta in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: December 20th, 2012, 02:08 AM
  2. Help me plss! :(
    By FutureExpert in forum What's Wrong With My Code?
    Replies: 8
    Last Post: January 5th, 2011, 10:53 AM
  3. [SOLVED] T_T [hellllppppp] Input/Output
    By bontet in forum File I/O & Other I/O Streams
    Replies: 9
    Last Post: October 29th, 2010, 11:32 AM
  4. help with code plss
    By tonka in forum What's Wrong With My Code?
    Replies: 7
    Last Post: November 5th, 2009, 07:12 AM