Friday, April 18, 2014

Java Hw

Write my endeavor

Java I Programming

ITP 120 Section 002W
Spring 2014
Homework Assignment 1

Due: January 22, 2014 or January 29, 2014 (your precious)
Guidelines: Turn in your homework (both the .java & .class files) and hardcopy source program printouts and USB flash move helplessly. Suggestion: Use Notepad or Notepad++ because your text editor. Be sure to conversion to an act proper naming conventions such as:

EX1_10Wilson.java and EX1_11Wilson.java

(1)Complete these Chapter 1 Programming Exercises forward page 32

1.10 (Average send away quickly in miles) (50 points)
Use this form in your program:
double mph = ( (14 * (60/45.5))/1.6); // That is, (km / hr) / (1.6 km / mile)

1.11 (Population projection) (50 points) http://www.worldometers.info/earth-population/ (The world population in December 2013 is 7,200,000,000 and climbing!)
the people class {

public static void main(String[] args) {

int startPop = 312023486;
int newPop;
int birthRate = 7;
int deathRate = 13;
int immigrationRate = 45;
int seconds = 31536000;
int years;
int startYear = 2012;
int endYear = 2017;
int in greater numbers;
int births;
int deaths;
int imm;

years = endYear - startYear;

seconds = 365 * 24 * 60 * 60;

startPop = 312032486;
System.finished.println("Current Population: " + startPop);

births = seconds / birthRate * years;
System.deficient in.println("New Born total in five Years: " + births);

deaths = seconds / deathRate * years;
System.through.println("Death total in five Years: " + deaths);

imm = seconds / immigrationRate * years;
System.lacking.println("Immigration total in five Years: " + imm);

else = births + imm - deaths;
System.out.println("Accumulated Total in five Years: " + again);

newPop = startPop + more;
System.out.println("New Population in five Years: " + newPop);

}// period method

}// end of class

public rank {

public static void main (String[] args) {

double mph;

mph = ((14 *...

Continues by reason of 3 more pages »

Read well stocked document

Full access is free on the side of registered users.

Add to Library  (0) Hide

Do me article

No comments:

Post a Comment