Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
What is a flexible solution then? I can make the explanation consist of Strings, and println them, but I'm wondering if there's a convention for doing it. The same for the output.. Is there a more advanced technique you would recommend, such as putting them all in a file and reading lines from it or somesuch? Really to make the code flexible, I need to know more i/o because otherwise I don't know what I'm leaving flexibility for :| (where or how to leave it). Makes me want to learn some swing or javafx.
I didn't like the int[] triangle[] code either (will rewrite with int[][]triangle), but as far as i could find, the double brackets are required to declare it as a two dimensional array? (otherwise it's an array that just holds ints, not arrays of them?)
Thanks, bro. Read this like 5 times, will consider how to incorporate 1. a private Triangle class (reuse for all three triangles?) 2. a use default option as an interface which chooses between 2 constructors, one with default Euler settings, and one with user supplied settings. 3. taking the solving/printing of the problem out of the constructor and into a solve function called from main just so it's not so odd =P
Supposed to avoid thanks, but this is my first post so... I'll just revel in the interwebs. Yeah, it's overkill but student practicing for rl here. The thing that pulls these disparate problems together is the desire for accessibility.