Question about Computers & Internet

Open Question

Creating a program using Java PL that mimics a calculator

Posted by on

1 Suggested Answer

Jubert
  • 249 Answers

SOURCE: I am java beginner and I want a help in writing a

the best thing to do here is to separate the steps for calculating the variance into different functions. To compute the variance the first thing to do is to compute the mean or the average of the numbers in the array. so your first function will loop through each of the numbers and divide it by the length of your array. the output is the returned. The next thing to do is create another function for the variance. loop through each of the numbers again and subtract to each number the mean. square the value then add to the previous. so that means you have another variable that starts from zero and just adds the answer. after that divide it by the length of the array again and what you are going to get is the value for the variance.

Posted on May 26, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

When someone says then need to create a solution using java what do they mean?


Java is a programming software used in many areas like websites, cell phones apps and many more. Java scripts used to desigh how the web sites interact with the viewers. Java also used to create apps used in the cell phones. These apps can be designed to solve certain problems.So when someone says they need to create a solution using Java, they might refer to the fact that they need to create a new app or redesign how an app should respond to the commands.

Nov 13, 2014 | Cell Phones

2 Answers

What is strings in java?


Handling character strings in Java is supported through two final
classes: Java String and StringBuffer. The String class implements immutable character strings, which are read-only once the string has been created and initialized, whereas the StringBuffer class implements dynamic character strings. All string literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.

Nov 21, 2012 | Sun Java Programming Language (cdj-275)

1 Answer

How do I take a screenshot of the work done on the calculator? I have a casio 9860 G II


I would like to help but currently I do not have the time to describe a flawless procedure to get the screen of your calculator on the computer.
However I do have an easier procedure for you: Use a Casio Emulator program. It is s program you run on your computer that mimics the working of your calculator. Fortunately for you, Casio has one such program for the FX-9860G ( also known as Graph 85 in Europe).
Here is a link to download it
http://www.planet-casio.com/Fr/logiciels/voir_un_logiciel_casio.php?showid=19
Once you get to the page, click on the link in GRAPH85emulator.exe (2.6Mb).
Execute it on your computer anytime you want to save some screen to the computer.
Perform the calculations you have to on the emulator. Then right click in the emulator area and select the option Capture Screen.
Open an image editing program (paint, Gimp or what have you and copy CTRL V in the program window.)

k24674.png

Mar 03, 2011 | Casio FX-9860G Graphic Calculator

1 Answer

How to program calculator in java


Hello,
If the question is : how to make a programmable calculator run a program written in Java, the amswer is : you cannot. Maybe the newer ones.

But if you are looking for the source code of a Java applet that simulates a calculator, then maybe you should launch a Google search with keywords Java calculator and see what you get. I do not want to spoil your fun by supplying a link to what my search returned.
Hope it helps.

Oct 09, 2009 | Canon Office Equipment & Supplies

1 Answer

I am java beginner and I want a help in writing a java program to calculate the variance for an array of numbers


the best thing to do here is to separate the steps for calculating the variance into different functions. To compute the variance the first thing to do is to compute the mean or the average of the numbers in the array. so your first function will loop through each of the numbers and divide it by the length of your array. the output is the returned. The next thing to do is create another function for the variance. loop through each of the numbers again and subtract to each number the mean. square the value then add to the previous. so that means you have another variable that starts from zero and just adds the answer. after that divide it by the length of the array again and what you are going to get is the value for the variance.

May 13, 2009 | Computers & Internet

1 Answer

Code for method parseInt() in java


parseInt(java.lang.String, int)

This code takes two arguments, a string constructor from the Java language and an integer. Its purpose is to parse (meaning de-construct or disassemble into component parts) one data type into another.

Here is an example of a Java program to specify and print out the dimensions of a rectangle, taken from the page http://www.roseindia.net/java/beginners/entervaluesfromkeyboard.shtml:

class Rectangle{
int length, breadth;
void show(int x, int y){
length = x;
breadth = y;
}
int calculate(){
return(length * breadth);
}
}
public class EnterValuesFromKeyboard{
public static void main(String[] args) {
Rectangle rectangle = new Rectangle();
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
rectangle.show(a, b);
System.out.println(" you have entered these values : " + a + " and " + b);
int area = rectangle.calculate();
System.out.println(" area of a rectange is : " + area);
}
}

Apr 09, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

How to creat a report with java? i need Java Enterprises latest tool. how download? how to creat a exe file from java?


If you would like to create a report with java there are a couple of things that you could focus on using. You could either go for Crystal Reports, or even Jasper Reports or any other reporting kit for java. To download the Java Enterprises latest tool.. I need clarification with this one. Do you mean J2EE SDKs? if you do just go to the sun microsystems website and download it from there. To create an exe file... jars are normally the ones you get when you compile java codes. The best thing to do here is to create batch files to run your compiled java applications.

Mar 24, 2009 | Sun Computers & Internet

1 Answer

JAVAC IS NOT RECOGNIGED AS AN EXTERNAL OR INTERNAL COMMAND OPERABLE PROGRAM OR BATCH FILE''


Your PC - not the calculator - printed this message. It means that the PC tried to execute the Java compiler, but couldn't find the program. Either the Java compiler is not installed, or the PATH environment variable is not set correctly.
To install the Java compiler follow the instructions for installing J2SE at java.sun.com To fix the PATH environment variable: right-click on My Computer, select Properties, select Advanced System settings, select environment variables, edit or create a new variable called PATH in the system or user settings with the path of the javac.exe program. This is often found in c:Program FilesJavain (it's in a java...bin directory somewhere)

Mar 02, 2009 | Texas Instruments TI-83 Plus Calculator

1 Answer

How to write jdbc connections


http://www.jdbc-tutorial.com/

window.google_render_ad();

welcome_title_image.gif Java JDBC Tutorial Java JDBC Tutorial
The JDBC ( Java Database Connectivity) API defines interfaces and classes for writing database applications in Java by making database connections. Using JDBC you can send SQL, PL/SQL statements to almost any relational database. JDBC is a Java API for executing SQL statements and supports basic SQL functionality. It provides RDBMS access by allowing you to embed SQL inside Java code. Because Java can run on a thin client, applets embedded in Web pages can contain downloadable JDBC code to enable remote database access. You will learn how to create a table, insert values into it, query the table, retrieve results, and update the table with the help of a JDBC Program example.


window.google_render_ad();
Although JDBC was designed specifically to provide a Java interface to relational databases, you may find that you need to write Java code to access non-relational databases as well.
JDBC Architecture jdbc.jpg Java application calls the JDBC library. JDBC loads a driver which talks to the database. We can change database engines without changing database code.
JDBC Basics - Java Database Connectivity Steps Before you can create a java jdbc connection to the database, you must first import the
java.sql package.
import java.sql.*; The star ( * ) indicates that all of the classes in the package java.sql are to be imported.
1. Loading a database driver,
In this step of the jdbc connection process, we load the driver class by calling Class.forName() with the Driver class name as an argument. Once loaded, the Driver class creates an instance of itself. A client can connect to Database Server through JDBC Driver. Since most of the Database servers support ODBC driver therefore JDBC-ODBC Bridge driver is commonly used.
The return type of the Class.forName (String ClassName) method is “Class”. Class is a class in
java.lang package.
try { Class.forName(”sun.jdbc.odbc.JdbcOdbcDriver”); //Or any other driver } catch(Exception x){ System.out.println( “Unable to load the driver class!” ); } 2. Creating a oracle jdbc Connection

The JDBC DriverManager class defines objects which can connect Java applications to a JDBC driver. DriverManager is considered the backbone of JDBC architecture. DriverManager class manages the JDBC drivers that are installed on the system. Its getConnection() method is used to establish a connection to a database. It uses a username, password, and a jdbc url to establish a connection to the database and returns a connection object. A jdbc Connection represents a session/connection with a specific database. Within the context of a Connection, SQL, PL/SQL statements are executed and results are returned. An application can have one or more connections with a single database, or it can have many connections with different databases. A Connection object provides metadata i.e. information about the database, tables, and fields. It also contains methods to deal with transactions.
JDBC URL Syntax:: jdbc: <subprotocol>: <subname> JDBC URL Example:: jdbc: <subprotocol>: <subname>•Each driver

Feb 01, 2009 | Microsoft Windows XP Home Edition

1 Answer

Java codes on calculator


when this is type of messeage u shown...that means u make some wron url..first try to correct ur spealing mistake than u see.

Mar 10, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

118 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

101642 Answers

David Payne
David Payne

Level 3 Expert

14160 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...