Program That Calculate Minimum Fixed Monthly Payment

Jun 11, 2014

I want to Write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance.

the Amount is 3,500 the annual rate is 9.9%, the minimum payment is 2% a month. the fixed payment is 150.

By a fixed monthly payment, we mean a single number which does not change each month, but instead is a constant amount that will be paid each month.

The program should print out :

payment information:
new balance total .......
current payment due .......

if you make minimum payment (2%) you will pay of in .... months and you Will end up paying an estimated total of $........

if you make the fixed rate payment, you will pay of in .... months and you Will end up paying an estimated total of $........ and you will save $........

View Replies


ADVERTISEMENT

Mortgage Calculator - Monthly Payment Is Not Getting Out Correctly

Sep 25, 2014

This is for a mortgage calculator and we have to use the math.pow method. I am getting results, but the results are wrong. The monthly payment is coming out to big.

Here is what it should be:

Enter loan amount: 10000
Enter rate: 4.5
Enter number years: 3

The monthly payment is: $297.47

Here is what I'm getting.

Enter loan amount: 10000
Enter rate: 4.5
Enter number years: 3

The monthly payment is: $566.06

Here is my code. I believe my issue is in the math.pow formula.

Scanner in = new Scanner(System.in); // input object

double loanAmount; //user input
double interestRate; // user input
double yearNumber; // user input
double monthlyPayment; // answer to math
double finalPayment; // output
double monthNumber; // year number converted of months
double monthlyRate; // converted intersted rate

[Code] ....

The monthly payment is: $%.2f", monthlyPayment); // Shows monthly payment

View Replies View Related

Payroll System For Hourly / Fixed Monthly And Commission Paid Workers Of Company

Dec 21, 2014

I am doing a program where i have to implement a payroll system into a company for hourly, fixed monthly and commission paid workers. I also have to put the method which i did. the problem is I cant tell if my calculation is wrong or if i am missing a codes some where. The output is not giving me the answer that I was at least expected,

Here is my method:

{
< double total_deduction;>
< total_deduction = gross_pay - deduction;>
< return total_deduction;>
}
< public static double calGrossH(double hours_worked, double pay_rate)>

[Code] .....

I have done a lot researching and have come up with some search with almost the same calculation and I have also asked employees of a company on how they calculated hourly rate, commissions rate and fixed rate for all workers and gotten the same response but for some reason the output is not what it is supposed to output. here is my output.

<
un:>
<please enter the number of employees to be processed 31>
<please enter employee id number 3669>
<please enter employee first name>

[Code] ....

I dont know if I am missing some calculation somewhere or codes been researching and bussing my brains to figure out where is the missing codes or calculation.

View Replies View Related

Calculate Time For Loan Payment - Writing Java From Pseudocode

Nov 26, 2014

calculate how long it would take to pay off a loan of 500 pounds if there was 10% interest monthly, and 100 pounds was paid each month. This code is in a pseudocode,

set months = 1
set balance = 500
set totalpaid = 0;
while balance > 100
balance = balance - 100;
set interest = balance * 0.1
balance = balance + interest
totalpaid = totalpaid + 100
months = months + 1
endwhile
totalpaid = totalpaid+balance
display "you paid "+totalpaid
display "It took you "+months+" months"

View Replies View Related

Three Different Internet Service Provider Packages - Calculate Customer Monthly Bill

Feb 20, 2011

What to do with this JAVA code?

This is the code that I need to do without using the Joptionpane:

An Internet service provider has three different subscription packages for its customers:

Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.

Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour.

Package C: For $19.95 per month unlimited access is provided.

Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges.

This is what I have so far : Cannot use Joptionpaneshowinputdialog

/* A demonstration of how to use Decision Structures

import java.util.Scanner;

/**
This program demonstrates a switch statement.
*/

public static void main(String[] args)
{
char packageLetter;
int hoursUsed;

[Code] ....

View Replies View Related

Calculate Minimum And The Maximum

Nov 21, 2014

i need to calculate the minimum and the maximum, actually it seems to be easy but, the minimum should be the smallest number but 0..this is my code

Java Code:

Scanner s = new Scanner (System.in);
int max = 0 ;
int min = 0 ;
System.out.println(" Please enter 3-5 numbers");
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
int d = s.nextInt();
int e = s.nextInt();

[code]....

View Replies View Related

Program For Airline Ticket Booking - Fixed Origin City And Five Destination Cities

Oct 26, 2014

I am doing a pretty basic program with a fixed origin city and five destination cities. I am having trouble with entering passenger details. This is what I tried, but then I cannot retain all passenger details to print later on in the final ticket.

System.out.println("Enter flight details of child passengers (below 12 years)");
System.out.println("Enter Name");
for(a = 1; a <= cp; ++a)
{
//cp is number of child passengers, a is loop variable
String name = br.readLine();
System.out.println("1. " + name);
}

View Replies View Related

How To Find Out Minimum JRE Requirement For Java Program

Jan 26, 2014

I finished a game in Java and sent it to a friend. Launching the program in my computer worked just fine.

But he got this error : "Could not find the main classs: Main. program will exit"

My JRE version is the most updated one. His JRE was version 1.6. He updated his JRE, and the problem was solved.

This is a bit worrying for me, because as far as I know, 1.6 isn't a very old version of the JRE. It's not the most recent one, but not that old.

This is worrying because I'm planning on sending my game to a lot of friends, and trying to distribute it on the internet.

A lot of people don't have the most updated JRE. And they are mostly non-programmers, so I can't expect them to update to the newest version of Java upon downloading my game. They might not know what Java is, even though they got it on their computer, and upon receiving an error, they'll just give up on the game.

If my game wouldn't work with a significantly old JRE, that would be reasonable. It's part of the nature of working with Java. But the fact that a relatively updated JRE, 1.6, doesn't work with my game, is worrying.

*(Please note: My game isn't implementing anything "special". Swing and KeyBindings are the 'newest' additions to Java that I can think of inside my game)*.

In short, I'd like to know that my game works on most of the computers it tries to run on. Knowing that it doesn't work on a relatively new JRE, is worrying.

So I have two questions:

1. Is it normal, for a Java program, to have such "high" demands for the JRE version? Do a lot of Java games demand at least version 1.6 of the JRE? Is this common?

2. How can I find out the minimum JRE version requirement for my program? Is there a methodical way to do this, or do I just have to go through all the libraries I use in my game and figure out what's the JRE release version for each one?

View Replies View Related

Program That Find Minimum Value In Array Of Integers

Feb 3, 2014

I'm required to create a program that finds the minimum value in an Array of integers.

Here is my approach :

public class Person {
public static void main(String [ ] args){
int theArray[]=new int [10];
int result = 0;
for (int i:theArray){
if (i < Integer.MAX_VALUE)

[Code]...

I can't really progress from this position. I keep getting told to change the return type to int on main method, then when i do it says change it to void..

View Replies View Related

Car Rental Program - Display User Who Spent Maximum And Minimum Rent

Apr 22, 2015

I am working on this rental program and got stuck in the last part. The program is about renting a car; after completing the rent process it displays the user who spent maximum and minimum rent. This is where I can't proceed. The program displays maximum values for both max and min. Here's the code I have written:

import java.util.Scanner; // program uses Scanner 
public class CarRentalTest {
public static void main( String[] args )
{
System.out.println("Welcome to Rental Portal");
Scanner input = new Scanner( System.in ); // create Scanner to obtain input from command window
CarRental details=new CarRental();

[Code] ....

View Replies View Related

Servlets :: Payment Gateway In Java

Jan 20, 2011

How to implement the payment gateway in java.

View Replies View Related

Monthly Temperature Chart Of Two Places - Array / While Loops

May 29, 2014

I started taking a java programming class javascript eclipse The program says it wants a monthly temperature chart of two places..Declare an array of values for Blueville temperatures and another array for Orlando temperatures. Then, use what you have learned to produce a program to output the following table:

Blueville Monthly temperatures

jan feb mar apr may jun jul aug sep oct nov dec

3 3 5 10 16 20 24 23 16 10 5 3

Orlando Monthly Temperatures

jan feb mar apr may jun jul aug sep oct nov dec

14 16 12 23 24 25 27 30 25 22 17 15

The warmest month in Blueville is _______

The warmest month in Orlando is ________

The month with the greatest temperature spread is __________

View Replies View Related

How Does Program Know To Calculate For Only One Year

Mar 26, 2015

how does the program know to calculate for only one year?

public class Interest2 {
public static void main(String[] args) {
double principal; // The value of the investment.
double rate; // The annual interest rate.
double interest; // The interest earned during the year.

[code]....

View Replies View Related

Swing/AWT/SWT :: JTable With Fixed Row

Nov 9, 2008

My JTable has a row, row number 0, which I always want to be at the top.I tried the following two approaches, both without success:

1- Use a custom table cell renderer for the header, and create a header of two rows. the second row is my JTextField.

Problem: I cannot get the JTextField to function properly. (I've seen examples with a checkbox in the header, but that one just reacts to a click somewhere on the header, my textfield must be editable).

2- Use the first row of the table. This works quite nice. However, I must prevent row 0 to be re-ordered when sorting the table.

I was thinking to add a prefix (either something like "___" or "zzz" depending on current sorting mode), but I do not know which methods to adjust for this exaclty.

Another approach would be to have N textfields above the JTable in some layout (or two JTable's on top of each other).

However, Then I would need to react to the re-ordering and re-sizing of all columns as well, which does not seem easy to me.

View Replies View Related

Create A Program That Will Calculate Different Tax Brackets

Oct 3, 2014

I have spent the past 12 hours on it and have gotten no where. I need to create a program that will calculate different tax brackets. I have tried all combinations I can think of and can't get it to work!!! I am literally about to go insane! I need the program to calculate tax will be 1% for anything up to $50000. If the tax is over $50000, you keep that 1% of $50000 and then add the remaining. So for an income in the second range, it would be 1% of $50000, and then 2% of (income - $50000). This then continues for each range.

The problem I'm having is getting it to display the correct interest rates. I am not asking for you to write it for me. I want to learn. But at this point I have exhausted all resources available to me.

import java.util.Scanner;
public class Project3taxinfo {
public static void main(String[] args) {
final double RATE1 = 0.01; //1% tax on the first $50,000
final double RATE2 = 0.02; //2% tax on the amount over $50,000 up to $75,000
final double RATE3 = 0.03; //3% tax on the amount over $75,000 up to $100,000
final double RATE4 = 0.04; //4% tax on the amount over $100,000 up to $250,000
final double RATE5 = 0.05; //5% tax on the amount over $250,000 up to $500,000
final double RATE6 = 0.06; //6% tax on the amount over $500,000

[code]....

View Replies View Related

Program To Calculate Area Of Circle

Mar 11, 2015

I'm starting with my version of very basic program: calculating area of circle. And of course it doesn't get well. My question: what is wrong in this code?

public class circleAre{
double radious;
void putData(double radi){
radi = radious;

[Code] .....

View Replies View Related

Cannot Get Average Program To Calculate Properly

May 9, 2010

I am having a problem with my program. I can't get my program to calculate properly. Everything compiles and run but its just giving me a wrong answer. I am suposse to get 115.50 but instead I am getting .30...

order.java
public class Order
{
double salesTaxRate; //initializing a variable for the sales tax rate.
double subTotal; //initializing a varliable for the sub total.
double shippingCost; //initializing a variable for shipping cost.
double salesTax; //initializing a variable for sales tax.
double totalCost; // initializing a variable for totale cost.

[Code] ....

View Replies View Related

Java Program To Calculate Diameter?

May 6, 2014

Assume the tanker is a cylinder of length 19.35 feet and volume 1320 gallons. What is the diameter in feet of the tanker truck? To solve this problem, write a Java program to calculate the diameter. For full credit, your Java application must follow these specifications.

1. The program must interactively input the capacity of the tanker in gallons and its length in feet. This should be done in the main method of your Tester class.

2. The input data should then be used to construct a TankerTruck object. You will need to write the TankerTruck class.

3. A TankerTruck method should be used by main to calculate the resulting diameter of the truck in feet.

4. Your program should use the standard Java constant for the math constant PI.

5. The output should be displayed using fixed-point notation, rounding to one decimal place of precision

View Replies View Related

Calculate Rainfall Quarterly Program

Mar 29, 2015

//calculates rainfall quarterly program
 
import java.util.Scanner;
 public class SophiaKeyProgram1 {
 public static void main(String[] args) {
// TODO Auto-generated method stub
int numQuarter; //number of quarters in a year
double rainfall=0; //the amount of rain

[Code] ....

I have everything but the min and max numbers.

View Replies View Related

Java Program Method To Calculate Distance

Feb 20, 2015

Write method distance, which calculates the distance between two points (x1, y1) and (x2, y2). All numbers and returned values should be of type double. Incorporate this method into an program that enable the user to enter the coordinates of the points, then calculate and display the distance by calling the method –distance.

I've tried numerous times to make it work and I'm on the right path, however I'm missing some things in the code to make my results look like this later on, which I've attached onto this post.

View Replies View Related

Program That Calculate Change Due To Customer By Denomination

Sep 20, 2014

write a program that calculates the change due to a customer by denomination; that is, how many pennies, nickels, dimes, etc. are needed in change. The input is to be purchase price and the size of the bill tendered by the customer($100, $50, $20, $10, $5, $1).

View Replies View Related

Write A Program Using Loop And Break To Calculate Value Of Pi

Oct 5, 2014

having some trouble doing this. Here are the requirements:

1)Write a program using loop and break to calculate the value of PI.
2)You can use the following equation to calculate PI. PI=4/1-4/3+4/5-4/7+4/9-4/11+4/13 etc.. The program shouldn't loop until the criteria is satisfied.
3)The criteria is the value of PI you get is very close to the “real” value (3.1415926), meaning that their difference
should be smaller than a very small numeric number, e.g., 0.0001).
4)The control structures you may need for this program are loop, if-else, and unlabeled break.
5)The output should have the format: for each iteration, it has iteration number and the corresponding value of PI until that
iteration. The last line would be the final value of PI.

Here is my code so far:

package ids;
public class IDS {
public static void main(String[] args) {
double pi = 0;
for(int i=1; i<=100000; i++){
if ((i%2)==0){
pi+=(4/(2*i-1));

[code]...

View Replies View Related

Creating Program With Constructors And Calculate Result

Feb 11, 2015

The end result is when I print the total it comes out to be 0. Trying to solve this

package pay;
import java.util.*;
public class manager
{
public manager(String string, int i, String type) {

[Code] ......

View Replies View Related

Program Will Not Calculate Or Print Out Intersection And Difference

Nov 19, 2014

I have to use methods and loops to code this program. Cannot use any java set or any built in java shortcuts!

import java.util.Scanner;
public class setPractice {
public static Scanner kbd;
public static final int MAXSIZE = 20;
public static void main(String[] args) {
kbd = new Scanner(System.in);

[Code] .....

This is the input I put in my code and this is the output:

How many numbers will be in the 1st set: 3

Enter list of integers for 1st set:
34
2
56

The ascending order for 1st is:
2
34
56

How many numbers will be in the 2nd set: 4

Enter list of integers for 2nd set:
56
2
33
6

The ascending order for the 2nd set is:
2
6
33
56

The intersection of the two sets is: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

The difference of A-B is:

View Replies View Related

Swing/AWT/SWT :: Layout With Fixed Heights And Gaps?

Jan 29, 2015

I'm trying to build a GUI that must look lik on the image above. There must be three JPanles, the one above, with buttons and combo boxes, must have fixed height and all three must have fixed vertical gaps between them. I'm trying laout after layout but somehow it's not working. I'm allowed to use only standard Swing layouts.

View Replies View Related

Gradebook Program - Calculate Averages Of 25 Students Using 2D Arrays

Apr 16, 2014

I am making a gradebook program that calculates the averages of 25 students using 2D arrays in which the students have four test grades. I have figured out how to display the averages of each student in one column but I cant seem to figure out how to display the letter grade of the average into another column.

Right now my program reads from a .txt doc

Heres what I've got.

TestGradeBook.java

import java.util.*;
import java.io.*;
public class TestGradeBook {
public static void main (String [] args ) throws IOException{
//Declarations
final int ROWS = 100;
final int TESTS = 4;

[Code] .....

GradeBook_Data.txt
Name100100100100
// basic name and grades

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved