It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

Java Foundations Intro to Program Design and Data Structres

page: 2
1
<< 1   >>

log in

join
share:

posted on Oct, 15 2014 @ 03:11 PM
link   

originally posted by: DigitalJedi805

originally posted by: wwe9112
a reply to: DigitalJedi805

LOL what do you mean they look fun for kicks though >_< lol. Like the star one, I read that and got mad lol. Personally, I would just use println a hundred times lol.


I'll be sure to let you know
.


Lol well you're not very far off of how I'd approach that one - maybe like... a for loop nested under another for loop - as one goes up, the starting point of the second goes up. Inside of the double-nest - print out like... 10 - FirstInteger 'spaces' - and 'FirstInteger' stars, followed by a line break.

Think I just nailed it


** Nah... That's not right. I'm inclined to write it though... Maybe this evening - I should be working lol

And please do. I'll keep an eye on this thread.


I gave you all it would allow me lol. Thank you for assuring me. It is pretty legible to read lol. It's more or less just kind of knowing what to use over another way of doing something lol.

I'm glad I'm farther off then most people lol. This is my first programming class. I also have a markup class (HTML and CSS) but lol that's not programming; it's pretty easy. The hardest part about that is deciding which colors look good where. I get to be a fashion designer for a while lol.




posted on Oct, 15 2014 @ 03:16 PM
link   

originally posted by: wwe9112
a reply to: DigitalJedi805

LOL what do you mean they look fun for kicks though >_< lol. Like the star one, I read that and got mad lol. Personally, I would just use println a hundred times lol.


I'll be sure to let you know
.


For the star one, a friend of mine needed help with a program that printed out numbers in a specific fashion. So use this and study how it works, it'll help! But if you wanna figure it out by yourself/come up with something yourself (best way to do it!), then ignore the code!



Here is the code:

docs.google.com...


edit on 15-10-2014 by Kuroodo because: (no reason given)

edit on 15-10-2014 by Kuroodo because: (no reason given)

edit on 15-10-2014 by Kuroodo because: (no reason given)



posted on Oct, 15 2014 @ 03:17 PM
link   
a reply to: Kuroodo

Yeah it was probably a little off - like I said I haven't done anything in Java for a while; I work primarily in C#.

Thanks for noting it and throwing it into Eclipse - I don't have it installed otherwise I woulda done the same.

** Dat .get().equals()

edit on 15-10-2014 by DigitalJedi805 because: (no reason given)



posted on Oct, 15 2014 @ 03:21 PM
link   
a reply to: wwe9112

Lol good lookin out; hardly a real concern, just thought I'd throw it out there


As far as 'knowing the logic to perform something' - there are an infinite number of ways to accomplish anything in software design - I can probably do half of the star patterns in 3 lines - but there are a hundred other ways I could compose the same logic. It's all about finding a logic set that achieves the intended goal; not necessarily writing the 'right' logic - that is all up to interpretation.



posted on Oct, 15 2014 @ 03:32 PM
link   

originally posted by: Kuroodo
a reply to: DigitalJedi805

Your code looked kinda weird to me. I pasted it in eclipse and got some errors and saw some weird stuff.

Here are some corrections I made to it. Nothing major!

textuploader.com...


Whoah - I just noted a bit of a miss in your own!

if(!File1Contents.get(i).equals(File2Contents))

Should be

if(!File1Contents.get(i).equals(File2Contents.get(i)))

If I'm not mistaken. I'm plugging this into my own right now.

** The difference here WWE, just so you see what I saw - is that in the first snippet it's a comparison between a String ( List Item at index i ) against the entirety of the opposing list. In the second 'corrected' ( I hope ) snippet, it's a comparison of list(1) index i to list(2) index i - string to string, vs string to list.

** Lol maybe I should just install Eclipse and run the darn thing...
** 150 MB < 60 seconds


** Bleh - needed the JDK as well - nearly have a development environment running; I'll plug in my text file verbatim and ensure that it works; and maybe one more reply with a link to some code that actually compiles and runs



edit on 15-10-2014 by DigitalJedi805 because: (no reason given)

edit on 15-10-2014 by DigitalJedi805 because: (no reason given)

edit on 15-10-2014 by DigitalJedi805 because: (no reason given)

edit on 15-10-2014 by DigitalJedi805 because: (no reason given)



posted on Oct, 15 2014 @ 03:53 PM
link   
Alright. There we go.

Installed Eclipse, adjusted a couple of things, made two files to compare with some slight differences, and here we are.

Exact Code

File 1 to compare

File 2 to compare

** Output from execution **


Mismatched content on line 7:
"Dog"
VS
"Dog and got eaten!"
Mismatched content on line 10:
"The Lazy Dog"
VS
"The Lazy Dog and got eaten!"


************************************


I'll leave all of this up for a little while; may move it down the road just to get it out of my site root lol - if I do and you still need it let me know. Won't be any time soon though.

** Funny - about the 'proper logic' conversation earlier - as I'm staring at this I've already considered a drastic rewrite that would make it faster and smaller. Much smaller.


edit on 15-10-2014 by DigitalJedi805 because: (no reason given)

edit on 15-10-2014 by DigitalJedi805 because: (no reason given)



posted on Oct, 15 2014 @ 04:00 PM
link   

originally posted by: DigitalJedi805

originally posted by: Kuroodo
a reply to: DigitalJedi805

Your code looked kinda weird to me. I pasted it in eclipse and got some errors and saw some weird stuff.

Here are some corrections I made to it. Nothing major!

textuploader.com...


Whoah - I just noted a bit of a miss in your own!

if(!File1Contents.get(i).equals(File2Contents))

Should be

if(!File1Contents.get(i).equals(File2Contents.get(i)))



Woah my mistake! I guess I forgot to add that part

Good find!



posted on Oct, 15 2014 @ 04:01 PM
link   
a reply to: Kuroodo

Two way road.




posted on Oct, 16 2014 @ 03:23 AM
link   
WhooooooOO!

Alright so I had some hundred proof C-Mo ( not a particularly flavorful; but thoroughly effective hard alcohol ) and decided to get aaaaaallll [snipy]y on you. ( < That's poopy* )

Check this.

C# Version of One of your star generation programs. It's 16 lines ( debatable - my math is off at the moment ) and prints out::

*
**
***
****
*****
******
*******
********
*********
**********
***********

-- If you change a couple of lines; swap some subtraction for addition ( or something... ) you achieve another one of the proposed printouts.

Now - where I got you, is by pitching in some C#.

C# is a language very equatable to Java. It is fully object oriented and runs in a virtual machine just like Java - the only Real difference is that Java is designed by Oracle and [the community] - whereas .NET ( The environment C# runs in ) is solely Microsoft based. The advantage of Java over C# is that you can gain interoperability between Windows, Linux, and Mac OSes - but in C# you have more straightforward access to 'Windows'.

*^*Exceptions may occur in environments line WINE.

Now - I pitch this at you as a test, and a lesson I hope.

If you can take what I railed out in C# and convert it into Java; you're officially a programmer. Or at least another step closer


The libraries and methods aren't incredibly different in naming or implementation; and in this case it's a [relatively] simple logical formula against a set of integers - which as I understand you've covered. The only difference you should see between this and Java is some verbiage, and perhaps some different libraries... And some capital letters... But I think you'll conquer those small humps easily enough.

Check it out, compare it against what I sent out earlier, and see if you can convert it. I bet you nail it, and I think it'll give you an idea of how to approach that particular set of problems.

Sorry... I'm on a kick. This is my ishniz.



Some Crazy-Complex #NotReallySoMuch C# Code!

** Even botched the URL... Someone get me another drink.

** PS... Go Microsoft: Spellcheck nails 'OSes' but misses 'Spellcheck' and 'Interoperability''. Really?
edit on 16-10-2014 by DigitalJedi805 because: (no reason given)



posted on Oct, 16 2014 @ 05:46 AM
link   
As a C# guy that was given 5 days to familiarise myself with Java, AngularJS, Bootstrap, Maven, the Atlassian SDK, the various libraries it uses and deliver a proof of concept application all I can say is... google + stackoverflow are your bestest friends


From personal experience what your lecturer is putting you though isn't too different to 'the real world'. It's fairly common to have something completely new thrown at you and being expected to 'just work it out'. It sounds like you're doing alright, just keep slogging away and things will get easier, particularly once you've grasped the core concepts that apply to pretty much all languages and libraries.



posted on Oct, 16 2014 @ 07:31 AM
link   
Sorry fellas for abandoning this thread. I had to go to work and now I am at school. I will get caught up on the conversation tonight or tomorrow morning after work.



posted on Oct, 16 2014 @ 01:44 PM
link   

originally posted by: wwe9112

posted on Oct, 16 2014 @ 05:31 AM

Sorry fellas for abandoning this thread. I had to go to work and now I am at school. I will get caught up on the conversation tonight or tomorrow morning after work.


Lol dang bro - no sweat - looks like you're on a pretty nutty schedule. PM me if you're so inclined, we'll exchange emails.



new topics

top topics



 
1
<< 1   >>

log in

join