The Artima Developer Community
Sponsored Link

Java Answers Forum
please help me..

1 reply on 1 page. Most recent reply: Sep 5, 2009 10:43 PM by mardhiah bakri

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
mardhiah bakri

Posts: 3
Nickname: mardhiah21
Registered: Sep, 2009

please help me.. Posted: Sep 5, 2009 10:37 PM
Reply to this message Reply
Advertisement
can someone help me..i don't know how to answer this question, i need to send this assignment next week..

write a program to find an average of n numbers. Your program must have at least two methods, which are a method to read n numbers and a method that will return the average of n numbers.

i would like to do it with JOptionPane..i just study topic Methods but i didn't really understand how to do methods..


mardhiah bakri

Posts: 3
Nickname: mardhiah21
Registered: Sep, 2009

Re: please help me.. Posted: Sep 5, 2009 10:43 PM
Reply to this message Reply
this question also..

Write a program that contains the following two methods:

public static double celsiusToFahrenheit(double Celsius)
- converts from Celsius to Fahrenheit

public static double fahrenheitToCelsius (double Fahrenheit)
- converts from Fahrenheit to Celsius

The formula for the conversion is:

fahrenheit = (9.0 / 5) * celsius + 32

Write a program that invokes these methods to display the following tables:

Celsius Fahrenheit Fahrenheit Celsius
40.0 105.0 120.0 48.89
39.0 102.2 110.0 43.33

32.0 89.6 40.0 5.44
31.0 87.8 30.0 -1.11

Flat View: This topic has 1 reply on 1 page
Topic: Chat room questions Previous Topic   Next Topic Topic: Assign digits in an integer to separate variables

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use