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

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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