• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Is there a better way of doing this?

 
Marshal
Posts: 65365
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have shortened your long lines (or at least the worst offenders), so we can actually read the posts. Only use // comments for things short; use /* comments */ on multiple lines for anything of any length,
 
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Campbell,

Yeah, that was my bad, should have done that before posting it in the first place... Sorry and thank you

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Righty, here's an example of what I meant in the earlier thread about values not being taken across...



No return on that yet, just trying to get this working first...
So, it's gotten to the point of taking user input and then jumps to the method in the other class with no data (I set a println to verify).



I understand that when you hop from one method to another the actual value is not stored, which leaves me with the question, how do I get the values into a method to be calculated? From what I've read the value will get stored in a single variable and moved across, but how would I go about doing that?

I am a little lost here

Any advice or pointers guys would be greatly appreciated.

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, how would it then be able to be calculated accurately considering it's more than a single double value? I mean it wouldn't just be carrying over 3, it would be the value the user wants a percentage of and the percentage amount of that value. Hope that makes sense :/

Thanks again,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Morning all

Righty, I have it working now except and really damn confused about this one, but sure it's something real small I'm missing:





Both the getSqrt and getCalc are working and display the result as they should, but for some reason, percentage comes back with 0.0... I inserted a println line after the percentage calculation (double prctTotal = val3 / 100 * val4) to make sure it was actually calculating and there was no problem there, it is displaying the correct answer until the result is returned at which point it displays as 0.0 and I'm really not seeing why. Could someone give me some idea of what I'm missing here?

Thanks,

Ben
 
Campbell Ritchie
Marshal
Posts: 65365
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ben Poland wrote:. . . when you hop from one method to another the actual value is not stored, . . .

Not sure I understand that bit.
You can have fields, which exist throughout the whole class and which have default values (probably all the memory filled with 0s). You also have local variables which only exist inside their method (or part of a method) and they do not have default values, so you must initialise them to some value (called definite assignment) before use. If you are getting 0.0, it probably means you have a field which you have not assigned a value and you are using the default of 0.0.
You are probably also shadowing things. That means you have a field and a local variable with the same name; you need something to identify the field as a field, otherwise the compiler assumes you want the local variable and the local variable takes precedence.
Change both those numbers to local variables and definitely assign them before trying to calculate the percentage. I am not convinced you need the fields.
Create a getDouble method which does nothing but get a double from the keyboard.

You cannot guarantee anything is accurate when you use floating‑point numbers. Calculating what percentage 85762.85483986534 is of 94587.836547926495873649586 will probably be all right for 15 sig fig.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Campbell,

I just removed double from before prctTotal and it's fine now. What you said makes it clear to me why that was happening now so thank you for that

I gotta say, I'm kinda hooked on Java now... Guess there are worse things to be hooked on! :O

Now to get the valOpVal thing sorted and the loop with q to quit program.

Which brings me to another question, adding a GUI, I have absolutely no idea at all about doing that. What is actually involved? Obviously there are a lot of options, but what are kind of the fundamentals of adding a GUI to your code? Hope that makes sense...

Thanks,

Ben

 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, in terms of the code I have written, is it clean and easy for you to read? To me it seems all good, but my limited knowledge and the fact that I wrote it makes it kind of impartial I guess I really want to make sure that it all makes sense to an outside observer and there is no wastage or unnecessary code, very important to me.

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey again,

Loop doing as suggested now too:


As you can see, just asks user if they want to loop again, if y is entered will prompt for what calculation or n it'll exit the program. Seems the most efficient way to get that working.

Ben

P.S. opValOp is making me want to weep!
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Knute,

Ok, more clues regarding match for the valOpVal problem please? Was hoping I wouldn't need to ask

Thanks,

Ben
 
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm working on this now, but just want to clarify I'm not ballsing this right up!


That's always a worry when you refactor a class. I'd advise saving a backup, or using some version control like Git or Github.

I think you're headed in the right direction, but I'll just clarify my position: I'd have a class that gets the input, a class that does the calculations, and a driver class that has the top level loop.

Driver pseudocode:

Function pseudocode:

I tried something like this before, but was unable to get the final value to pass into another method, which is why I decided I'd take a step back first and just go the method route for now.


You probably need to use a static inner class as a "record" to hold all the input responses and return them. Take a stab at this and I can post an example if you're not getting it.
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ok, more clues regarding match for the valOpVal problem please? Was hoping I wouldn't need to ask


That's okay, it's not a trivial problem. Basically you want a regex that does this:

* start at the beginning
* ignore any whitespace
* get a double
* ignore any whitespace
* get an operator
* ignore any whitespace
* get a double
* ignore any whitespace
* check that we're at the end

Some of these are easy. Start at the beginning is "^" (technically, it matches the beginning of the line), match the end of the line is "$". Any number of whitespaces is "\\s*" . That's \s (which has to be escaped in a Java String) and the modifier "*", which means zero or more of the thing just before me.

I like to spread out my regex patterns in a broken string, like this:

The things you will need to know:

* "\\d" matches a digit
* "." is a metacharacter that matches any character, so if you want a literal ".", use "\\."
* "[abc]" matches a, b, or c.
* "(" and ")" will group
* "?" matches zero or one time, that is, what is just before it (character or group) is optional
* "+" match the previous thing one or more times

Matching a double is actually very hard, but we can simplify it to:

* match one or more digits
* match an optional decimal point
* optionally match any number of digits

Whoo! That's a lot. Give it a try.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Knute,

Now there's a lot to work with! And certainly more efficient... I'll get all of this done and post it again when finished

Thank you, Knute... Very much. All this help has been amazing.

Ben


 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Knute,

Here's what I've done, just working on Regex stuff now, should have that sorted shortly (I HOPE!!)

Please let me know what you think, suggestions, wasted code, formatting, anything like that.

Class that holds loop and passes initial user choices:



Class that gets user values and passes them over to be calculated:



Class that does calculations and returns the results:



It works without an issues and it seems very efficient and clean to me. I added powers in now also...

I'm fairly sure that there is ways to cut this down, make it more efficient, but not that I know of right now. As usual, any comments, advice, suggestions would be very well received.

Thank you again guys,

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is really good! A few minor things:

* You have no import statements, so I had to add them
* You have no main() method -- I added that too.
* In the class SciCal, this line is unused and can be removed: SciCalc sCalc = new SciCalc();
* do/while loops are usually formatted like this:

* You should be using the return value of your SciCalcMath methods in SciCalcInputs, not the fields:

And if you did want to use fields, they should be private and you should access them through getters.

Your next step, after the regex, might be to validate your input better. Try "being mean" to your program, entering garbage or unexpected input. Your program should recover gracefully from this.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Knute,

I have the import statements in the actual code and the main method setup in a "launcher":


One of the other guys had posted about having this set in a different class, so I have taken to doing that. lol Yip, noticed that unnecessary line after I posted it

As for the formatting and other issues, I'll get onto that now. Thank you for pointing that out Yes, certainly one of the things that I like least about this is the lack of validation. I figure when you mean gracefully you mean, don't just crash and exit program? Better to display the error and then loop until user enters correct input? Guess that would be the best way of doing it anyway, be annoying to get half way through what you're doing, accidentally type something wrong and then crash for a single mistake :/ Which brings me to another thought, data retention I guess is how I'd think about it, not really applicable to small calculations like this, but if you had multiple line calculations, say doing algebra / calculus and you were calculating multiple points of data, would be damn nice to be able to refer back to a previous calculation or if you accidentally crashed the program, have the data saved that was there before the crash. Hope that makes sense.

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and GUI! I have no idea about setting a GUI, using it with my code etc... From what I've read it seems fairly complex and quite difficult to implement, at least to start off with. Is that the case? And what would be the best places to look to start learning this? I guess the most basic and easy to implement in th first place.

Thanks again,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol Knute, it was you that gave me the link to Main is a Pain, which I have actually applied to everything I have done since

Apologies, feel bad about saying "one of the other guys" and not remembering that was your advice in the first place, sorry But yes, I have done exactly as described in "Main is a Pain" since you linked it in the first place, it is literally the first thing I do when I start any project now

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I figure when you mean gracefully you mean, don't just crash and exit program? Better to display the error and then loop until user enters correct input?


Right. A "crash", or unexpected exit of the program should happen only when there is a condition your program cannot recover from. Input validation is not one of these conditions. Displaying some sort of warning and letting the user re-enter the input is the right way to handle things.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regex... Ok, so if I am understanding this correctly (probably not), it should look something like this:

"(^\\s+[\\d\\.?\\d][0-9])(\\s+[-+*/]\\s+)(\\s+[\\d\\.?\\d][0-9]$)"

As it seems in my head right now... I'll describe my thinking in groups.

"(^\\s+[\\d\\.?\\d][0-9]) = Group, check we're at the beginning, ignore any amount of whitespace, check for number, check for optional decimal point, check for number, check number value, close group
(\\s+[-+*/]\\s+) = Group, ignore any amount of whitespace, check which operator, ignore any number of whitespace, close group
(\\s+[\\d\\.?\\d][0-9]$)" = Group, ignore any amount of whitespace, check for number, check for optional decimal point, check for number, check number value, check we're at the end, close group

Am I even close? :/

Thanks,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I think this might be a little closer:

("^\\d*\\.\\d+\\s*$")
1st value: Group, check for start, check number (has to be \\d* as the number won't be preceeded by any others?), check for decimal (guess that's not optional as it's double the decimal will be there regardless of user input?), check number (\\d+ as there be a number preceeding it?), ignore whitespace, check for end, close group.

("^\\s*[-+*/]\\s*$")
Operator: Group, check start, ignore whitespace, check operator chosen, ignore whitespace, check end, close group.

("^\\d*\\.\\d+\\s*$"):
2nd value: Same as 1st value.


If I'm understanding this correctly, the [0-9] is optional and as I'm already using the \\d it shouldn't be necessary? Also, although when the calculation gets displayed it shows as a single line, when it's being entered it's taking 3 inputs (1st value, operator, 2nd value) so I'm guessing I need to check start and end of each group?

Please let me know if I'm way off with this... This seems right to me though, but I could VERY easily be not understanding this correctly.

Thanks guys,

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're on the right track. Here are a couple of things:

* Regexes are compiled from Strings, so you have to have a valid String. ("anything") won't work. "(valid regex)" will.
* You probably don't want "(\\s*[-+/*]\\s*)", because you don't want any whitespace in the operator, right? Probably this: "\\s*([-+/*])\\s*".
* Since regexes are Strings and are very hard to decipher, I like to put each part in its own String and concatenate them:

* Since you have two doubles you want to match, and those regexes aren't trivial, I'd put the double regex in its own String.

Now you can compile the Pattern and get a Matcher and test the regex.
* [0-9] and \d are the same, the latter is just a shortcut for the former.
* Since getting a complete version of a valid double is difficult, I would put the restrictions on entering the double where you have to enter at least one digit first (0.5, not .5).
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

I'm really at a loss here, I know the expression I'm using matches random values if I put them in as a string in the matcher...



That works fine no matter how I enter the calculation, be it 9.723*3.3 or 9.723 *3.3, with or without spaces and as many digits as I want, no problem... However, I can not understand how I'm supposed to be getting it to check userinput. I am assuming that I need matcher to get the values as they are entered, and then match it against the pattern. I can not for the life of me figure out how to get the matcher to look at the user entered values. I'm feeling a little dumb tbh :/

Could someone give me some idea of what I'm missing here? Sorry to keep asking for help guys, I'll try to stop being a pest

Thanks guys,

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Sorry to keep asking for help guys, I'll try to stop being a pest


No worries. That's what we're here for.

You know how to get the user input, right? So you have a variable call "line" or "expression". Use that instead of the literal "9.723 * 3.3".

 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey again,

Also got the loop working if someone enters "rewkjt".



This works well, anything other than a proper numerical value will prompt for a valid value. Is there a better way of doing this? I think this is clean and simple and does the job, but if there is a better way, would be good to use.

Thanks again guys,

Ben
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,

lol I am still trying to figure this out... I do have match taking and matching input now, which is a step in the right direction, but now I'm stuck on calculating that value rather than just printing it out. I tried coverting from a String to a double, but then confused about what to do from there. Am so confused :O

With regard:

System.out.println("Please enter your calculation: ");
// You don't need these
// double val1 = userVals.nextDouble();
// char operator = userVals.next().charAt(0);
// double val2 = userVals.nextDouble();
// You need to get the whole line
String line = userVals.nextLine();
// Now parse the line here
cMath.getGenMath(val1, operator, val2);
return cMath.result;
}



Do you mean I don't need to use that code at all now? If so, I'm assuming it's simply because the entire line gets taken at once via String? Also, if that does need to be converted to a double, what happens to the operator? And if not converted to a double, how will the string get valued? See? My confusion is obvious :O

This is what I did to confirm that matcher is actually taking input though:



I don't think any single problem has ever taken me SO long to get my head around! :/

Thanks,

Ben
 
Bartender
Posts: 6115
58
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you want to add a hyphen (-) to a character set it should always be either the first or last character in the set so as not to be confused with its use as a range specifier.
Change

To
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Carey,

Done. Thank you kindly for that, much appreciated

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Do you mean I don't need to use that code at all now? If so, I'm assuming it's simply because the entire line gets taken at once via String? Also, if that does need to be converted to a double, what happens to the operator? And if not converted to a double, how will the string get valued? See? My confusion is obvious :O


Regexes are hard! But they're powerful, so it's good to learn them.

You don't need to get a double, then a char, then a double anymore. You're going to parse the entire expression. Once you have the expression (line), match it to the regex. If it doesn't match, re-enter the expression. If it does, use the group method of the Matcher to extract the two values and the operator.

 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey again, Knute,

Fortunately that's very close to what I was doing, so I'm happy because it means that I was understanding it properly. Of course though, that brings me to another question... Would there be a way to completely ignore going the route of val1, val2 and simply have perhaps a string 3 * 3 + 3 - 3 / 3 for example and be able to get all of those values? I'm imagining that would be somewhat more complex.

Knute, I really owe you an entire farm of cows, your help has been great and at some point I might actually be content with this project rather than wanting to continually grow it

Thanks again, Knute.

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Would there be a way to completely ignore going the route of val1, val2 and simply have perhaps a string 3 * 3 + 3 - 3 / 3 for example and be able to get all of those values


You would need a full-blown parser and some stacks to do that. Might be fun. And you'd need to support parentheses I would imagine. This would not be "a little harder" but a whole new level of complex.
 
Carey Brown
Bartender
Posts: 6115
58
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:

Would there be a way to completely ignore going the route of val1, val2 and simply have perhaps a string 3 * 3 + 3 - 3 / 3 for example and be able to get all of those values


You would need a full-blown parser and some stacks to do that. Might be fun. And you'd need to support parentheses I would imagine. This would not be "a little harder" but a whole new level of complex.

If you are interested in this subject of parsing, you can look into the ANTLR library for Java.

Another approach would be to use post-fix expressions (what you've been working with is know as in-fix notation). In post-fix you expression would look like
3 3 * 3 + 3 3 / -
Post-fix is much easier to deal with because you only need to keep track of a stack of values.

push 3
push 3
result = pop * pop
push result
push 3
result = pop + pop
push result
push 3
push 3
result = pop / pop
push result
result = pop - pop
----done
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol Over my head then I think However, I'll keep get do reading on those subjects and have a little play and come back to using it at a later date. For now though, I would like to be able to put a gui on this and I have no idea about how I would do that. From what I've read it is not easy and takes a fair bit of practice / study to do. I'm fine with that, but what is the best way to approach this in the first place?

Thanks,

Ben
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest using JavaFX. It's the newest technology. The old technology is Swing and I would only learn it if you're going to be working on legacy systems.

I'd start here (on the left side). It's a lot to take in. You might want to create a "Hello, World" GUI first (at least) before attaching a GUI to your calculator.

I would also start a new thread in the JavaFX forum for this. Other people will be more knowledgeable than me, but I'm sure I can help.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Righty, so here's how it is now. Would you guys mind taking a look at it and letting me know your thoughts of how to improve it? No matter how big or small a suggestion it maybe, it's all good to know / try.

SciCalc Launcher:


SciCalc:


SciCalcInputs:


SciCalcMath:


Thanks

Ben

P.S. Knute, going to look at the Java FX stuff and will start a new thread regarding GUI stuff elsewhere Thanks again though, your help has been amazing...
 
Knute Snortum
Sheriff
Posts: 6163
163
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great job!

This formatting confused me for a second:

It's usually formatted like this:

I would probably make pattern in SciCalcInput static and final -- it's not going to change and it's the same regardless of the instance. Also, that way it only compiles once.

You don't need this: if (matcher.matches()) {, you've already check matcher in the do/while loop.

Use local variables as much as possible and declare them as late as possible. For instance, val1, val2, and operator can all be local variables.

Use the return value of a method instead of a public instance variable:

When you find yourself doing this:

...you can usually just do this:

In this situation, you may have at one time needed to set sqrtResult, but if you use the return values of the methods, you don't need the instance variables any more.
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Knute,

All amendments made This looks nice and clean and working well... I'll look into the more complex full-blown parser and stacks at a later date. Would like this to be the way I want it to be

For now I'm going to step back a bit and make sure that I really understand the "core" java concepts, methods etc first and then stride on again. I already have another idea in mind to play with too, it'll be using arrays as I kinda think that I should understand them and how they can be played with a lot better than I do. Arrays seem a VERY big deal in Java.

Knute, can't thank you enough for your help with all this, legend of a man! Thank you sir

Ben
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Ben.

I'm Marco Antonio from Rio de Janeiro (Brazil).

Some time ago, I made a study to see the differences among Java, Python and PHP, and I made a simple calculator to do that.

Below, is the code of the calculator in Java. I hope it help you.

Note: Some words in the code are in portuguese.

--------------------------------------------------------------------------------

Calculadora:

--------------------------------------------------------------------------------

src/Calculadora.java:

--------------------------------------------------------------------------------

src/Calculo.java:

--------------------------------------------------------------------------------

src/Exibicao.java:

--------------------------------------------------------------------------------

bin/Calculadora.class

bin/Calculo.class

bin/Exibicao.class

--------------------------------------------------------------------------------

build:

--------------------------------------------------------------------------------

build.bat:

--------------------------------------------------------------------------------

deploy:

--------------------------------------------------------------------------------

deploy.bat:

--------------------------------------------------------------------------------

run:

--------------------------------------------------------------------------------

run.bat:

--------------------------------------------------------------------------------

If you also wish the codes in Python and/or PHP, tell me so. I will send them to you too.

Marco Antonio M. Gralha
Postgraduated in Software Engineering with JEE
 
Ben Poland
Ranch Hand
Posts: 97
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Marco,

My apologies, I missed this post

Thank you for this though, I appreciate it. I can't speak or read, Portuguese I'm afraid so I'm very lost going through it although I get an idea of what's what

I actually only started coding about 2 weeks ago, haven't touched any other language before, Java so I really am a complete beginner to coding in general, not just Java. I do appreciate the offer regarding both Python and PHP, but they would make little to no sense to me I'm afraid.

Ben

P.S. You're welcome to send the Brazilian weather though, it's not so nice here at the moment :/
 
Marco Antonio Gralha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

If you wish, I can translate the portuguese parts into english.

Send me a reply, so.
 
Everybody's invited. Except this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!