473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

faulty java program

281 100+
What's that mean by faulty program in java? I am told that it is any wrong in calculation for numerical program. Really appreciate if someone could give examples here to clarify about this topic.
Thanks in advance
Feb 17 '07 #1
16 2286
r035198x
13,262 8TB
What's that mean by faulty program in java? I am told that it is any wrong in calculation for numerical program. Really appreciate if someone could give examples here to clarify about this topic.
Thanks in advance
A faulty program would compile and run without throwing any exceptions but would give the wrong result in some cases. A program designed to calculate the factorial of a number would be faulty if it gave say, 0 for the factorial of 0, even if it gives correct results for the other positive integers.
Feb 17 '07 #2
shana07
281 100+
A faulty program would compile and run without throwing any exceptions but would give the wrong result in some cases. A program designed to calculate the factorial of a number would be faulty if it gave say, 0 for the factorial of 0, even if it gives correct results for the other positive integers.
How about this:
original program: a > b
to get it fault, you change to b < a
After run, we get different result so we know that there is code error in the program. Is that so..?
thanks for the explanation.
Alright then one more question regarding this please, from your experience is there any example of complete numerical java program (open source)?
so from that I could learn to create/extract many faults.....
Feb 17 '07 #3
r035198x
13,262 8TB
How about this:
original program: a > b
to get it fault, you change to b < a
After run, we get different result so we know that there is code error in the program. Is that so..?
thanks for the explanation.
Alright then one more question regarding this please, from your experience is there any example of complete numerical java program (open source)?
so from that I could learn to create/extract many faults.....
Depends on what you mean by "complete numerical". Any program that uses a numerical type could be deemed numerical. You can write a program for solving a quadratic equation and play around with it or one to do a cubic spline e.t.c you can find lots of such programs on the internet. My bet is that it will be more fun if you write one yourself.
Feb 17 '07 #4
shana07
281 100+
Depends on what you mean by "complete numerical". Any program that uses a numerical type could be deemed numerical. You can write a program for solving a quadratic equation and play around with it or one to do a cubic spline e.t.c you can find lots of such programs on the internet. My bet is that it will be more fun if you write one yourself.
:)
complete here means - complete java program from open source which i can exctract many2 faults from it. and yeah as what you've said any program uses a numerical we can play with it...right. shall work on it.many thanks to you.
have a nice day!
Feb 17 '07 #5
shana07
281 100+
friends,
I do need confirmation about my java program. Please refer code below to see my question:
Expand|Select|Wrap|Line Numbers
  1. public ComplexNumber multDouble(double m)
  2.     {
  3.           ComplexNumber multDouble = new ComplexNumber(a,b);            
  4.             a=m*a;  //is this statement involves with two executions?           
  5.             b=m*b;  // ''
  6.  
  7.             return multDouble;
  8.     }
My lecturer was mentioning about focus on two executions in numerical java program. Please share few words...thanks.
Feb 21 '07 #6
r035198x
13,262 8TB
friends,
I do need confirmation about my java program. Please refer code below to see my question:
Expand|Select|Wrap|Line Numbers
  1. public ComplexNumber multDouble(double m)
  2. {
  3. ComplexNumber multDouble = new ComplexNumber(a,b); 
  4. a=m*a; //is this statement involves with two executions? 
  5. b=m*b; // ''
  6.  
  7. return multDouble;
  8. }
My lecturer was mentioning about focus on two executions in numerical java program. Please share few words...thanks.
What do you mean by two executions?
Feb 21 '07 #7
shana07
281 100+
What do you mean by two executions?
a = m * a
variable 'm' - one execution and 'a' one execution.
so to get them fault, I could change like a= m/a have you heard something like this before?
Feb 21 '07 #8
shana07
281 100+
hope someone could help me to get a clear picture about:
What is 'real life java program/software' ? is that something about to solve real problems?
If there is an example of this program please share with me...perhaps computation prog.
Really appreciate any efforts made to answer my this question.
thanks
Feb 21 '07 #9
sicarie
4,677 Expert Mod 4TB
hope someone could help me to get a clear picture about:
What is 'real life java program/software' ? is that something about to solve real problems?
If there is an example of this program please share with me...perhaps computation prog.
Really appreciate any efforts made to answer my this question.
thanks
A complete java program? That would be my guess for a 'real life java program' - one that can compile and run in a JVM.
Feb 21 '07 #10
shana07
281 100+
A complete java program? That would be my guess for a 'real life java program' - one that can compile and run in a JVM.
Really..okay..
I've heard my lecturer say is something like graph theory.
Feb 21 '07 #11
sicarie
4,677 Expert Mod 4TB
Really..okay..
I've heard my lecturer say is something like graph theory.
Taken out of context, i can only offer my best guess - you should talk to your professor and figure out if he's talking about a specific project he is working on (ie, RealLife Program), or if there is something else that is missing (ie, "analysis of real life program").

Of course, it's also possible one of the other people here have heard of it. Anyone?
Feb 21 '07 #12
shana07
281 100+
Taken out of context, i can only offer my best guess - you should talk to your professor and figure out if he's talking about a specific project he is working on (ie, RealLife Program), or if there is something else that is missing (ie, "analysis of real life program").

Of course, it's also possible one of the other people here have heard of it. Anyone?
thank you Sicarie. Really appreciate your say :)
that's why, i was hearing something like java programs
that solve real problems.
Feb 21 '07 #13
sicarie
4,677 Expert Mod 4TB
thank you Sicarie. Really appreciate your say :)
that's why, i was hearing something like java programs
that solve real problems.
Sorry I can't help more!
Feb 21 '07 #14
shana07
281 100+
Sorry I can't help more!
No worries mate.
Feb 21 '07 #15
r035198x
13,262 8TB
thank you Sicarie. Really appreciate your say :)
that's why, i was hearing something like java programs
that solve real problems.
Basically all programming laguages can solve some real life problems. With Java it is easy to model a real life situation by making use of object oriented programming principles.
Feb 22 '07 #16
shana07
281 100+
Basically all programming laguages can solve some real life problems. With Java it is easy to model a real life situation by making use of object oriented programming principles.
Yes, that's right.
I read in few articles some examples of real like programs are from SourceForge - such BooleanExpression or Commons.Math - Apache Jakarta & etc...
Feb 22 '07 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
7
by: Anjali M | last post by:
#include<stdio.h> int main() { int a = 10; switch(a) { case '1': printf("ONE\n"); break; case '2':
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
by: aureao4 | last post by:
I'm new to Java and programming. I'm trying to code a payroll program and continue getting errors. The program worked last week, this week I have to add set, get and a class. I've written the class...
166
by: Nimmi Srivastav | last post by:
Apologies if my cross posting has offended anyone.... For a pure hobbyist C/C++ programmer, who wants to develop applications to run on Windows, what would be a better choice to install: Visual...
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.