How would i fix the decimal error program below

Assignment Help JAVA Programming
Reference no: EM13942080

Below is an example on 4 primitive data types of them.
Please provide all 8 primitive data types in Java

public class PrimitiveDataTypes {

public static void main(String[] args) {
short age = 43 ;
int numberOfCustomers= 170;
float salary = 12345.23f; // the f is used to denote this is a float datatype. The default is double!
double stateAnnualBudget = 8648645.74;
System.out.println("The float is " + salary + " the double is " + stateAnnualBudget + " the int is" + numberOfCustomers + " the short is " + age);
// now try the other four!
}
}

Simple Program

How would I fix the decimal error program below?
Please illustrtate and suggest another string that will show dblamt in Java

public class SimpleProgram {

public static void main(String[] args) {
double amount = 200.00;
int numberOfEmployees = 3;
System.out.println("Amount divided between the number of employees is: " + amount/numberOfEmployees);
}

}

Mortgage Program
I need help writing a Java program without a graphical user interface that calculates and displays the monthly mortgage payment amount, given the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage.

• In this program, hard code the amount as $400,000, the term as 15 years, and the interest rate as 7.75%. Insert comments in the program to document the program.

Reference no: EM13942080

Questions Cloud

Equire purchasing equipment from variety of sources : An American firm is evaluating an investment in Mexico. The project will require purchasing equipment from a variety of sources and shipping it to Mexico. The projected cost of buying the equipment and shipping it is $4.2 million. Calculate the NPV i..
How does zayid establish credibility : Discuss whether or not Zayid uses transitions (or "signposts") to guide the audience through her speech. Be sure to include examples to support your point of view.
Intelligent statements about the two instructors : How about the standard deviation?  Do you think we can make some more intelligent statements about the two instructors when we have the standard deviations?
The internet to grow into a worldwide tool : How have standards allowed the Internet to grow into a worldwide tool?
How would i fix the decimal error program below : How would I fix the decimal error program below
The accounts payable figure includes : The Accounts Payable figure includes $10,000 in wages earned by the company's 12 employees during May. No one earned more than $2,200.
Write an essay on the economic value of hiring on intelligen : Write an essay on: 'The Economic Value of Hiring on Intelligence'
What is the overall rate of return on the portfolio : One year ago, an American investor bought 2000 shares of London Bridges at a price of £24 (or 24 UK pounds) per share when the exchange rate was $1.4/1£ (or $1.40 dollars = 1 pound). The investor also invested 4,000,000 Japanese Yen in a money market..
Patent license agreement with cherokee manufacturers : Watt Inc is the owner of patent #1234. On 1/1/01 Watt entered into a patent license agreement with Cherokee Manufacturers. The agreement calls for an initial lump sum payment of $100,000 and an ongoing royalty of 5% of the selling price of any pro..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a 2-by-3 two-dimensional array of integers

Create a 2-by-3 two-dimensional array of integers and fill it with data. Loop through the array and locate the smallest value stored.

  Design an interface interactive game

First, design an interface InteractiveGame that generalizes the playing of any two-person game between a human player and the computer. Design two actual games, Nim and another game of your choice, except TicTacToe, that implement your Interactive..

  Define a class called counter an object of this class is

define a class called counter. an object of this class is used to count things so it records a count that is a

  Each purchase contains an invoice number amount of sale

Create a class named Purchase. Each Purchase contains an invoice number, amount of sale, and amount of sales tax. Include set methods for the invoice number and sale amount.

  Write a program that assigns seats on an airplane

Prepare a program that teaches arithmetic to a young child. The program tests subtraction and addition. Write a program that assigns seats on an airplane.

  Punished for minor infractions given their mental illness

What if you a Disciplinary Hearing Officer in a unit with mentally ill inmates? How would you sanction offenders for infractions without punishing them for their illnesses? Do you think they should be punished for minor infractions given their mental..

  Write a program that simulates a simple calculator

Write a program that simulates a simple calculator. It reads two integers and a character. If the character is a +, the sum is printed; if it is a -, the difference is printed; if it is a *, the product is printed; if it is a /, the quotient is pr..

  Part - 1build a graphical user interface for displaying the

part - 1build a graphical user interface for displaying the image groups cluster in jmjrst. design and implement using

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Temporarily move to the street so that the

Driveway is a "last-in, first-out" stack. Of course, when a car owner retrieves a vehicle that wasn't the last one in, the cars blocking it must temporarily move to the street so that the requested vehicle can leave

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Corrections as necessary and output screen snapshots

Submit all completed programs, with corrections as necessary and output screen snapshots, to demonstrate that they all perform properly to meet the specifications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd