Why do so many students have trouble with round robin? It's not even a difficult concept, much less a difficult implementation. Yet every year (right around this time too), we're bombarded with one-liner questions by new members.
>Airline homework problem? Whats that?
IIRC, you're supposed to write a system to schedule passengers on a plane to varying degrees of complexity. Usually it's pretty simple, but requires adding and removing passengers and assigning seats.
Are most computer science professors that incompetent?
..To be honest, it's unfortunate, you learn more from Google and the forum, than these instructors...it's sad. Neither did i know about the airplane algorithim. For example, on one of the programs, I used a 'break' with a 'for' loop. The program compiled ok, but i lost point because he said, never to break out of a 'for' loop. The point is...the program still worked...
>but i lost point because he said, never to break out of a 'for' loop.
Wow, I would have slapped that guy silly for that kind of nonsense. I didn't know structured programming zealots like that still existed. But I guess if they don't actually write code for a living, it's easy to sit back and criticize real world code using best practices from some computer scientist's wet dream.
well said narue...but by the way, he never told why it's wrong to break out of a for loop..he just said, don't do it. Any reasons why people may say, never to break out of a for loop since you'll get the same result?
>Any reasons why people may say, never to break out of a for loop since you'll get the same result?
Structured programming advocates single entry, single exit. That means only one return from a function (at the end), the only way to leave a loop is to fail the condition, etc... Naturally it's all BS, because often you end up writing even more cryptic code to adhere to the very guidelines that were designed to improve readability. Structured programming is good to a point, but beyond that point it's just silly.
I've learned that what i actually write for clients and what I learned in class and books is pretty darn far apart and for the most part the instructor has become too far seperated from reality to give good advice.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.