DevX Home Today's Headlines   Articles Archive   Tip Bank   Forums

# Thread: Complete 100% Noob don't understand a thing!!

1. Registered User
Join Date
Sep 2004
Posts
1

## Complete 100% Noob don't understand a thing!!

**Must be done with JCreator LE 3.10**

I'm currently taking a intro to Java course (is required) and I have to write 4 programs within the next 15 hours, and I don't honestly have a clue where tostart, when I read the stuff I feel like I am reading chinese. So if anyone can hlep this poor soul that'd be greatly appreciated. Help me understand this please!!
Here's my 4 problems:
2.1 - Write a program that converts Fahrenheit to Celsius. The formula for the conversion is as follows:
celsius = (5.0 / 9.0) * (fahrenheit - 32)
Your program reads a Fahrenheit degree in double from the input dialog box, then converts it to Celsius and displays the result ina message dialog box.

2.5 - Write a program that reads an integer between 0 and 1000 and summarizes all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14

2.7 - Write a program that reads an integer and checks whether it is even. If your input is 25, your output should be: Is 25 even? False
If your input is 2000, your output should be: Is 2000 even? True

2.9 - Write a program that computes future investment value at a given interest rate for a specified numbers of years. The future infvestment is determined using the following formula:
futureInvestmentValue=
investment X (1 + monthlyInterestRate)^numOfYears*12
Your program should prompt the user to enter investment amount, annual interest rate, and numbers of years, and should display the future invesment value.

Hopefully you guys can help me to understand this stuff in ENGLISH,

Thx
Dijital

2. Senior Member
Join Date
Mar 2004
Posts
635

make a method called convert or something, which takes in 1 parameter of type "double" (int, float, double, char, etc....) Then have the method return a double, the celsius variable.

celsius = (5.0 / 9.0) * (fahrenheit - 32)

How to tell if a number is even. Have you ever covered "modulus" in math?

If you don't know how to write a method(function), I suggest reread your book for starters.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 FAQ Latest Articles Java .NET XML Database Enterprise