|
Post by Prone on Sept 14, 2006 7:07:50 GMT -8
I'm currently taking a course in computer science 1: intro to c++: early objects.
I've been studying very well in the class, and I'm able to write some pretty cool programs. Basic programs, anyway.
If you would like me to make a calculation program or whatever, i'd be glad to. I just have to make sure i know how to do it!!!!
Get a c++ compiler, and i'll give you the source code either in a post, or i'll pm it to you, and then you can compile that in a compiler.
|
|
|
Post by raen7 on Sept 23, 2006 20:18:34 GMT -8
What, you don't have the right tools to compile it into a stand-alone app? Noob.
I remember my first program in high school C. It was a text adventure with 2 global variables and a total of 4 possible endings. I look at it now and I just laugh.
Let's see, what can you do in first year programming? A soda-machine program! I remember doing one myself... but I was doing Java at the time. If you don't worry about the GUI and just do console input/output, I bet you could write up a soda-machine program in C++.
|
|
PhoenixFlare500
Diamond Membership
I like chocolate[ss:LostPeon's Gray][ss:LostPeon's Gray]
Posts: 896
|
Post by PhoenixFlare500 on Sept 24, 2006 8:46:50 GMT -8
Exactly what do you mean by a Soda Machine program? You just press a key or something and text pops up on a screen saying "Congratulations you bought a Coke!" 'cause you don't need to know a lot about programming to do that.
|
|
|
Post by LostPeon™ on Sept 24, 2006 19:36:30 GMT -8
A vending machine program. ie. A program where you input how much money you have, the selections pop up on the screen, you select what you want/how many, you get your change. Probably the hardest part is calculating the change, if I remember right. Most of it is just monotonous.
|
|
PhoenixFlare500
Diamond Membership
I like chocolate[ss:LostPeon's Gray][ss:LostPeon's Gray]
Posts: 896
|
Post by PhoenixFlare500 on Sept 24, 2006 20:50:36 GMT -8
So what happens if you try to put $100 in? Does it just give you $99 in change or something like that? 'Cause I'd make it say something like "You're an idiot!!! Use a normal amount of money like everybody else!!!"
|
|
|
Post by technohawk on Sept 24, 2006 22:47:52 GMT -8
You know, instead of a vending machine program you could create an insult machine. Anytime you ask it to do something it just mouths off to you(or "texts" off to you I suppose)
|
|
|
Post by Prone on Sept 25, 2006 6:18:53 GMT -8
I can compile the program for you.
Anyway, its only been a month since i started writing in c++, and i wrote a program to calculate wage for a month, and it adds overtime too. You can see your wage as it is through the week, or you can spread it out over the week, if your not working a full week.
I think i can make the soda machine program though. Wouldn't be that hard.
|
|
|
Post by greeny on Sept 25, 2006 14:26:43 GMT -8
yes.. you've mentioned it numerous times but it sounds kind of cool
|
|
|
Post by raen7 on Sept 25, 2006 16:49:48 GMT -8
A vending machine program. ie. A program where you input how much money you have, the selections pop up on the screen, you select what you want/how many, you get your change. Probably the hardest part is calculating the change, if I remember right. Most of it is just monotonous. Bingo. Now get to work, PTC!
|
|
|
Post by Prone on Sept 26, 2006 5:50:47 GMT -8
I pulled the program together yesterday in about 1-2 hours, may have been 2-3, i don't know.
It asks for input of how much money you have. If you don't have enough money for even the cheapest item, it will say so, and quit. Once you put in money though. It shows a list of 7 drinks with your cash counter at the top. once you select a drink, it will first tell you what drink you chose. it will then ask how much you want of that drink.. Once you did that, it will tell you how much money's worth of that drink you bought, then tell you how much money you have left. It will ask if you want to buy any more drinks. If you say yes it will show that list of drinks again. However, if you don't have enough money to buy a certain drink, that drink will not show up in the list. You will keep the same ammount of cash you had last time until you run out.
If you decide that you don't want to buy anymore drinks, it will show you your refund.
If you bought a drink, then run below the minimum required to buy the cheapest drink, it will say "sorry, but your cash is too low!!".
I put a total in there to calculate the total price of drinks you bought, but for some reason the program couldn't compute it, so i took it out. It will however, give you the total ammount of the purchase you made at that time, but i decided not to do it that way.
Besides writing programms, i also mod the demo. Have you ever seen an SCV will an ATA laser battery, and hellfire rockets as air weapons?
BTW, that wage program i mentioned can also show wage for a year, and ask how many years in the future to calculate to.
|
|
|
Post by raen7 on Sept 26, 2006 17:02:39 GMT -8
Besides writing programms, i also mod the demo. Have you ever seen an SCV will an ATA laser battery, and hellfire rockets as air weapons? "Mod the demo" what? Starcraft? Can't you buy the whole battlechest for like 20 bucks? And even if you can't, that game came out before copy-protection was half-decent; I myself have made about 3 copies of my originals. And where's the SodaMachine, so I can break it?
|
|
|
Post by LostPeon™ on Sept 26, 2006 20:20:49 GMT -8
You took the easy way out. You're supposed to have it calculate change given back in dollars and coins. Vending machines don't just say, "oh, here's your change" and give you a piece of paper with a random number written on it. You have to calculate out how many dollars first, then the quarters, dimes, nickels, and pennies. And, of course, you don't want it to give you like two dimes and a nickel, and not a quarter.
|
|
|
Post by Chalupa! on Sept 26, 2006 20:55:24 GMT -8
Yeah, and some times it should reject the dollar for no reason, just spitting it back out. This should just be random and after the user puts it in a few more times, the program takes it.
|
|
|
Post by rabidgecko on Sept 26, 2006 21:01:26 GMT -8
this isnt a problem so much with pop machines as with chip machines but if you make a chip machine dont forget that all too often the bag of chips doesn't make it all the way down, and you would need to find way to dislodge and shake the machine to get your chips
|
|
PhoenixFlare500
Diamond Membership
I like chocolate[ss:LostPeon's Gray][ss:LostPeon's Gray]
Posts: 896
|
Post by PhoenixFlare500 on Sept 26, 2006 21:28:19 GMT -8
I find most coins get accepted right except for pennies. That really annoys me, 'cause I always have an abundance of pennies.
|
|