Java Math.PI Circle Radius

Mountain State University Java Assisgnment

2.28 (Diameter, Circumference, and Area of a Circle

Write an application that inputs from the user the radius of a circle as an integer and prints the circle’s diameter, circumference, and area using the floating-point 3.14159 for PI.

Java circlePi.java Source Code

import java.util.Scanner;

public class circlePi {

public static void main( String[] args )
{
Scanner input = new Scanner( System.in );

int cRadius; //radius of circle

System.out.print( "Enter the radius of a circle " ); // prompt for user input
Read more →

0

Java Palindrome

Mountain State University Java Assignment

3.30 (Palindromes)

Write an application that reads in a five digit integer and determines whether it’s a palindrome. If the number is not five digits long, display an error message and allow the user to enter a new value.

Java Palindrome Source Code

import java.util.Scanner; //initialize scanner

public class palindrome // defines class name
{

public static void main( String[] args )
{
// Scanner = new Scanner( System.in );
Scanner input = new Scanner( System.in );

int digit; // enter 5 ...

Read more →
0

Java Salary Calculator

Mountain State University Java Assignment

3.20 (Salary Calculator)

Develop a Java application that determines the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time and a half for all hours worked in excess of 40. You are given a list of the employees, their number of hours worked last week and their hourly rates. Your program should input this information for each employee, then determine and display the ...

Read more →
0

Java – Pythagorean Triples

Java – Pythagorean Triples

Mountain State University Java Assisgnment

Java How to Program: Exercise 4.21 page 165

4.21 (Pythagorean Triples)
4.21 (Pythagorean Triples – Source Code)

/*
Pythagorean Triple
A right triangle can have sides whose lengths are all integers.
The set of three integer values for the lengths of the sides of a right triangle
is called a Pythagorean Triple. The lengths of three sides must satisfy the relationship that the sum of the
squares of two of the sides is equal to ...

Read more →
0

Java Reference

Java Reference (Sun Microsystems)

This page is utilized for a reference to Java.

Url’s

Java API:
http://java.sun.com/javase/7/docs/api/ 

Learn the Java Programming Language:
http://edu.netbeans.org/bluej 

W3 Schools Tutorial:
http://www.w3schools.com/js/default.asp 

Sun Microsystems Official Java Page:
http://www.java.com/en 

Join the Sun Developers Network:
http://developers.sun.com/user_registration/whyregister.jsp 

SDN Channel:
http://developers.sun.com/channel/ 

The NetBeans IDE BlueJ Plugin:
http://edu.netbeans.org/bluej 

Read more →
0
Page 2 of 2 12