simple java question
I am new to java and not quite proficient in programming . I need some help with a java program that would generate 1000 random integers and send them to a file with no duplicates. Thanks a lot your assistance is much appreciated.
|
Here's an easy way if your just looking to get it done,
Code:
import java.util.*; Also, if this is for homework, you may not get full marks for this solution, so you would be better off to think of your own solution. |
sorry nothing to contribute to the thread starter.
hey 95se i see your 4th year at the U. i graduate next month from st clair [:(] with 3yr programming and a 2yr networking diplomas. im really considering transfering the credits over, and ill start there in 3rd semester and graduate in 5 from the honours program (if i choose to go through with this). anyways, how tough is it? what are the averages? if you dont mind, thanks |
I sent an e-mail, but, basically, it's as tough as you make it. Most classes are suppose to have a C average (60%). Some are higher, some are lower. If you really enjoy Comp. Sci., you'll do fine I believe.
Also, how is the 3 yr. programming course? I have a friend who just started his first year in St. Clair in programming. |
thanks for the response, i didnt get the email sorry. maybe it was sent to my junkmail which i dont check and automatically got deleted after X days.
i do really enjoy it, but i hear that the CompSci (and eng) are just as much math degrees as the majors. let me tell you im terrible at math so thats why i think i wont enjoy it or have a smooth time there. my friend whos at the U let me borrow his calculus book which im going to try and review before the winter semester when i hope to enroll. the st clair diplomas were honestly easy. the first year is a joke, programming wise (unless you had ZERO programming knowledge). second year we did 2 java courses, an asp course, 3rd year we did another java course and 2 c++ courses, as well as the 'technical project'--go out find a company and write something for them, pretty interesting it was. i just feel i dont know enough to go start workign, after getting these diplomas. i think they emphasized java too much, i feel very comfortable with it (didnt teach any socket stuff though), but i wish they spent more time on c++ or even one intro c course before c++. good luck to your friend.. if hes like yourself or myself, who really enjoy it and really want to know the ins and outs, tell him to consider switching after first year, rather than be like me and spent 7 semesters there and have them only transfer to 2 at the U. cya |
If you want C++, you won't really get it at the U :| It's mostly C or Java with the odd course using some other language (C++, Lisp, Assembly). Do note, 3rd year+ are more theoretical, so the programming is really secondary to the main goals of the course or non-existant.
As for math, there is a decent amount of math, but it's not too bad. I'm in the software eng. stream which is slightly more math-oriented than say, a regular CS Honours. Total Math courses for me: Differential Calculus, Integral Calculus, Linear Algebra, Mathematical Foundations (Set theory and proofs), Statistics, and Numerical Methods. It's basically just the introductory courses for each "type" of mathematics, but no more than that. Some courses are also more math oriented, or use the same principles (proofs, induction, etc..). It's hard to separate the 2 (Comp. Sci. and Math), since mathematicians really laid most of the ground work and foundations (and still are) for computer science and programming. I'm not bad at math, but I know some people who, according to them, suck at math. They just make up for the bad math grades, with good grades in other courses. Basically, math is a part of it, but not so much that if you aren't fond of straight math, it'll ruin your experience. Definately check out the text book your friend gave you; even try just auditing a course if you have time. |
Quick side note: I find it best to learn/practice Lisp apart from learning and practicing any other programming language. Lisp is miles from "ordinary" when it comes to any other language. For example, Java vs. Lisp, creating a limit from the first argument, and storing all values in a list:
Java: Code:
import java.util.ArrayList; Code:
(defun foo (limit) Lisp is a neat language to learn, and makes quick work of most tasks, but it is completely different from any other language I've seen. EDIT: Quick question 95se, how come you have Lisp highlighted in red? |
Quote:
It may be more complex to use other computing objects, but your point on Lisp conciseness is correct. Quote:
I prefer C and its sequels ... Quote:
My guess: It's just you who find this thread by searching the forums for the Lisp keyword. |
thanks jlliagre. wierd thing is, I don't recall posting a search for lisp. *shrug* no biggie.
|
Quote:
Quote:
Quote:
and i do think that since ive already taken 7 semesters in the field, at least the start of my career at the U (CS-wise) should be easier than the other students, id imagine... so i could focus more on the mathematical side since thats where i wouldnt be strong. thanks for the tips, and good luck to you |
Quote:
|
not to butt in on your conversation guys, but 60% is a C. thats awesome! i sure could have used that scale in some of my english classes. ha.
|
Quote:
|
Quote:
|
ya we did afew Systems analysis + design in college using OO methodoligies.
Quote:
i dont know how my courses are going to transfer over but hopefully id be able to do afew first year courses that introduce C. is '60-100 Key Concepts in Computer Science' C-oriented? or '60-256 Systems Programming'? id like to take the intro to algorithms 1 and 2, but dont think i would, id probably be tossed into 2nd year with afew 1st year classes. my friend that has the same college diploma as me, as ive mentioned, is at the U in 3rd semester and these are his courses: Code:
Differential Calculus 03 62-140 thanks ps-do you think youll go for graduate studies after your next semester? |
All times are GMT -5. The time now is 09:42 AM. |