[QUOTE=Pirate Ninja;26090487]Oh ye, sorry.[/QUOTE]
It's okay. : )
[QUOTE=geel9;26089207]Does anyone else use the "at least one major feature/fix a day" method for programming? Generally if I don't "commit" to it I forget about it for weeks, whereas if I just do ONE thing a day I get done really quickly.[/QUOTE]
Write things to post-its and stick them to your monitor :
You'll have a list of what you must do and what you have done.
[QUOTE=geel9;26089207]Does anyone else use the "at least one major feature/fix a day" method for programming? Generally if I don't "commit" to it I forget about it for weeks, whereas if I just do ONE thing a day I get done really quickly.[/QUOTE]
I have this white board next to my desk (I highly recommend this) and I write out all my planed features, big and small. Usually accompanied by a picture, and I like to cross them off from most important to least.
[QUOTE=polkm;26090949]I have this white board next to my desk (I highly recommend this) and I write out all my planed features, big and small. Usually accompanied by a picture, and I like to cross them off from most important to least.[/QUOTE]
I don't have a white board, nor a good place to put one at that. But I either use Toodledoo which is new for me. But I usually have a txt file of all my ideas.
I also have things on my ipod that gets moved onto my txt file because sometimes I thing up ideas during school or while I'm not at my computer so I'll type it there and I copy it to my computer when the chance comes up.
[QUOTE=Pirate Ninja;26090223]No wonder it took you 1 year to create falling notes if you only do one thing a day.[/QUOTE]
You're a fucking asshole and have no idea what you're talking about.
[QUOTE=polkm;26090949]I have this white board next to my desk (I highly recommend this) and I write out all my planed features, big and small. Usually accompanied by a picture, and I like to cross them off from most important to least.[/QUOTE]
I'm going to make a post-it wall. I think it feels more "indie awesome fuck year".
[highlight](User was banned for this post ("flaming" - GunFox))[/highlight]
Well after a few hours of frantic coding to get this done on time (finished it 5 minutes before it was due) I think I am ready to post my first c++ code!
[code]/*
Program: Car Purchase do while loop
Author: LuckOrLoss
Date: 11/15/2010
Lecture/Lab Section: FP WAYWO
Purpose: This program will calculate a car loan payment plan for the user at least once and then again
if the user enters a Y to loop again. The user can choose to add a package
to the car that will increase the base price. Once the total price for the
car is determined the program will ask the user to input values for their
down payment ammount, the life of the loan, annual interest rate, and their
anual income. This data will determine the monthly payment and if the user
is eligible for the loan. The user is eligible for the loan if their
monthly income is at least four times greater than the monthly payment.
*/
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
//Declaring variables
int packageCost, loanLife, months, totalCost;
char package, loop;
float downPayment, interestRate, income, monthlyIncome, monthlyPayment, principal, monthlyInterestRate;
//Outputing information about the car and its packages
cout << "Welcome to the helpful car purchasing program!\n";
cout << "You have chosen a Honda Civic with a base price of $17,800.\n";
cout << "There are four additional packages available for this car.\n\n";
cout << "Package P includes: auto transmission, power windows and locks, stereo sound system. Cost: base + 1200\n\n";
cout << "Package L includes: all of the above plus MP3 player, security alarm, cruise control. Cost: base + 1800\n\n";
cout << "Package D includes: all of the above plus deluxe detailing, pin stripes, leather seats, wind bar. Cost: base + 2300\n\n";
cout << "Package S includes: all of the above plus seat heaters, Bose speakers, OnStar, steering wheel control of music system, chrome rims. Cost: base + 2800\n\n";
cout << "If you do not want a package enter the letter 'B'\n\n\n";
//main program do-while-loop
do
{
cout << "\n\nWhich package if any would you like to add-on (P L D S or B)? ";
cin >> package;
//Finding how much the package you chose costs
switch(package)
{
case 'P': packageCost = 1200;
break;
case 'L': packageCost = 1800;
break;
case 'D': packageCost = 2300;
break;
case 'S': packageCost = 2800;
break;
default: packageCost = 0;
package = 'B';
}
totalCost = 17800 + packageCost; //Adds the base price and the package price to get the total price
//Inputs the rest of the information needed to find out montly payment and if the user can afford the loan.
cout << "\nYou have chosen package " << package << " which is $" << packageCost << endl;
cout << "\nThe total cost for the car will be $" << totalCost << endl;
cout << "\nWhat will be your down payment? ";
cin >> downPayment;
cout << "\nWhat will be the life of the loan in years? ";
cin >> loanLife;
cout << "\nWhat will be the annual interest rate? ";
cin >> interestRate;
cout << "\nWhat is your annual income? ";
cin >> income;
principal = totalCost - downPayment;
months = loanLife * 12;
monthlyInterestRate = interestRate/(12 * 100);
monthlyPayment = principal * (monthlyInterestRate/(1-(pow(1+monthlyInterestRate,-months)))); //Finds monthly payment
monthlyIncome = income / 12;
cout << "\n\n\nThe monthly payment for this loan is $" << monthlyPayment << "\n\n";
if(monthlyIncome>=monthlyPayment*4) //Checks to see if four times the montly income is greater than the montly payment, if true, the loan is approved.
{
cout << "You are eligible for this loan!\n\n";
}
else
{
cout << "Because your montly income is not at least four times larger\n";
cout << "than the monthly payment you are not eligible for this loan.\n\n";
}
//Asks the user if they want to go again; an answer of Y will make the program go again.
cout << "Would you like to go again (Y/N)? ";
cin >> loop;
}
while(loop == 'Y');
cout << endl << "Good-Bye!" << endl;
return 0;
}
[/code]
There were two other parts to this project where instead of a do while loop I had to use a for loop and a while loop. I would like to know where I could improve, and what is better, "\n" or "endl"?
[QUOTE=luck_or_loss;26092425]Well after a few hours of frantic coding to get this done on time (finished it 5 minutes before it was due) I think I am ready to post my first c++ code!
[code]/*
Program: Car Purchase do while loop
Author: LuckOrLoss
Date: 11/15/2010
Lecture/Lab Section: FP WAYWO
Purpose: This program will calculate a car loan payment plan for the user at least once and then again
if the user enters a Y to loop again. The user can choose to add a package
to the car that will increase the base price. Once the total price for the
car is determined the program will ask the user to input values for their
down payment ammount, the life of the loan, annual interest rate, and their
anual income. This data will determine the monthly payment and if the user
is eligible for the loan. The user is eligible for the loan if their
monthly income is at least four times greater than the monthly payment.
*/
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
//Declaring variables
int packageCost, loanLife, months, totalCost;
char package, loop;
float downPayment, interestRate, income, monthlyIncome, monthlyPayment, principal, monthlyInterestRate;
//Outputing information about the car and its packages
cout << "Welcome to the helpful car purchasing program!\n";
cout << "You have chosen a Honda Civic with a base price of $17,800.\n";
cout << "There are four additional packages available for this car.\n\n";
cout << "Package P includes: auto transmission, power windows and locks, stereo sound system. Cost: base + 1200\n\n";
cout << "Package L includes: all of the above plus MP3 player, security alarm, cruise control. Cost: base + 1800\n\n";
cout << "Package D includes: all of the above plus deluxe detailing, pin stripes, leather seats, wind bar. Cost: base + 2300\n\n";
cout << "Package S includes: all of the above plus seat heaters, Bose speakers, OnStar, steering wheel control of music system, chrome rims. Cost: base + 2800\n\n";
cout << "If you do not want a package enter the letter 'B'\n\n\n";
//main program do-while-loop
do
{
cout << "\n\nWhich package if any would you like to add-on (P L D S or B)? ";
cin >> package;
//Finding how much the package you chose costs
switch(package)
{
case 'P': packageCost = 1200;
break;
case 'L': packageCost = 1800;
break;
case 'D': packageCost = 2300;
break;
case 'S': packageCost = 2800;
break;
default: packageCost = 0;
package = 'B';
}
totalCost = 17800 + packageCost; //Adds the base price and the package price to get the total price
//Inputs the rest of the information needed to find out montly payment and if the user can afford the loan.
cout << "\nYou have chosen package " << package << " which is $" << packageCost << endl;
cout << "\nThe total cost for the car will be $" << totalCost << endl;
cout << "\nWhat will be your down payment? ";
cin >> downPayment;
cout << "\nWhat will be the life of the loan in years? ";
cin >> loanLife;
cout << "\nWhat will be the annual interest rate? ";
cin >> interestRate;
cout << "\nWhat is your annual income? ";
cin >> income;
principal = totalCost - downPayment;
months = loanLife * 12;
monthlyInterestRate = interestRate/(12 * 100);
monthlyPayment = principal * (monthlyInterestRate/(1-(pow(1+monthlyInterestRate,-months)))); //Finds monthly payment
monthlyIncome = income / 12;
cout << "\n\n\nThe monthly payment for this loan is $" << monthlyPayment << "\n\n";
if(monthlyIncome>=monthlyPayment*4) //Checks to see if four times the montly income is greater than the montly payment, if true, the loan is approved.
{
cout << "You are eligible for this loan!\n\n";
}
else
{
cout << "Because your montly income is not at least four times larger\n";
cout << "than the monthly payment you are not eligible for this loan.\n\n";
}
//Asks the user if they want to go again; an answer of Y will make the program go again.
cout << "Would you like to go again (Y/N)? ";
cin >> loop;
}
while(loop == 'Y');
cout << endl << "Good-Bye!" << endl;
return 0;
}
[/code]
There were two other parts to this project where instead of a do while loop I had to use a for loop and a while loop. I would like to know where I could improve, and what is better, "\n" or "endl"?[/QUOTE]
What class is this
[editline]16th November 2010[/editline]
Also your comments are useless, why comment an if statement that's 100% clear?
[editline]16th November 2010[/editline]
Also your comments are useless, why comment an if statement that's 100% clear?
Yeah, don't get in the habit of over commenting.
OH and also, your code only allows CAPITAL letters. If they enter "s" it'll think they said B.
The class is ITCS 1212 and the teacher wants us to comment till it feels bad. Other than that the uppercase doesn't really matter because we haven't gotten into formatting too much. I think they're just using c++ as an introduction before we get to java, even though I really want to learn c++.
What I really want to know whether \n or endl is better than the other. Or do they just have their own places that they are better in?
I got infinite level generation working on my Infinite Mario Clone. Now to make the levels actually playable
[QUOTE=luck_or_loss;26093221]The class is ITCS 1212 and the teacher wants us to comment till it feels bad. Other than that the uppercase doesn't really matter because we haven't gotten into formatting too much. I think they're just using c++ as an introduction before we get to java, even though I really want to learn c++.
What I really want to know whether \n or endl is better than the other. Or do they just have their own places that they are better in?[/QUOTE]
They both do the exact same thing.
I've been working on a project in LOVE today, which does pretty much the same thing as the program on page 3.
[img]https://dl-web.dropbox.com/get/pic.PNG?w=0534e208[/img]
I have collision working, but still need light collision.
(The cornflower blue dot is the player)
[QUOTE=geel9;26091419]You're a fucking asshole and have no idea what you're talking about.
[/QUOTE]
Jeez, it was a joke, no need to flame man.
[QUOTE=geel9;26093587]They both do the exact same thing.[/QUOTE]
Yes and no. It is true that they will output the same, however endl will also flush the buffer everytime you call it.
[QUOTE=Kylegar;26093497]I got infinite level generation working on my Infinite Mario Clone. Now to make the levels actually playable[/QUOTE]
Combine with this:
[media]http://www.youtube.com/watch?v=DlkMs4ZHHr8[/media]
[QUOTE=Robert64;26081924][csharp]switch( StageID )
{
case 1:
textBox.SetText( "Please go to the Dungeon and find my Generic Loot Item!", "large", Color.White );
break;
case 3:
if( World.Player.Inventory.Contains( myQuestItem ))
{
textBox.SetText( "Thank you so much! Have money!", "large", Color.White );
World.Player.Inventory.RemoveItem( myQuestItem );
World.Player.GiveMoney( 250 );
Advance();
}
else
goto default;
break;
default:
textBox.SetText( "Did you find it in the Dungeon? Try looking again.", "large", Color.White );
break;
}[/csharp][/QUOTE]
Why aren't you using enums?
It's not much by some of your standards, but I'm having a second crack at OpenGL programming (now with 90% less deprecated code!)
[IMG]http://imgur.com/qnWGx.png[/IMG]
First one to guess which book I'm using wins a virtual cookie
[QUOTE=Chris220;26094509]It's not much by some of your standards, but I'm having a second crack at OpenGL programming (now with 90% less deprecated code!)
[img_thumb]http://imgur.com/qnWGx.png[/img_thumb]
First one to guess which book I'm using wins a virtual cookie[/QUOTE]
I hate virtual cookies. I like real ones :v:
Sphere world is from the OpenGL superbible.
[editline]16th November 2010[/editline]
Can I get my cookie in real format.
[editline]16th November 2010[/editline]
Can I get my cookie in real format.
[QUOTE=blankthemuffin;26094546]Sphere world is from the OpenGL superbible.
[editline]16th November 2010[/editline][/QUOTE]
Indeed it is, well done sir
I wasn't sure how best to send a cookie via the internet, I was afraid I might get crumbs everywhere
Instead, have a picture of a cookie inside the mouth of a blue muffin shaped like the cookie monster
[img]http://www.babble.com/CS/blogs/strollerderby/2009/02/cookie-monster-cupcake.jpg[/img]
Can anyone recommend me a compiler for C++ to turn them into a program.
[QUOTE=Chris220;26094576]Indeed it is, well done sir
I wasn't sure how best to send a cookie via the internet, I was afraid I might get crumbs everywhere
Instead, have a picture of a cookie inside the mouth of a blue muffin shaped like the cookie monster
[img_thumb]http://www.babble.com/CS/blogs/strollerderby/2009/02/cookie-monster-cupcake.jpg[/img_thumb][/QUOTE]
thx
[QUOTE=blankthemuffin;26094686]thx[/QUOTE]
I made a transparent avatar version for you:
[img]http://imgur.com/oyQJy.png[/img]
[QUOTE=Pirate Ninja;26094725]I made a transparent avatar version for you:
[img_thumb]http://imgur.com/oyQJy.png[/img_thumb][/QUOTE]
thx
[QUOTE=PvtVain;26094595]Can anyone recommend me a compiler for C++ to turn them into a program.[/QUOTE]
I hear Borland XDev-Visual G++ is pretty good
[QUOTE=PvtVain;26094595]Can anyone recommend me a compiler for C++ to turn them into a program.[/QUOTE]
-snip-
[QUOTE=r4nk_;26094911]This isn't possible - C++ is an interpreted language and you will [b]NEVER[/b] be able to turn it into an executable file[/QUOTE]
Alright. How was I suppose to know that :v:
[QUOTE=PvtVain;26094934]Alright. How was I suppose to know that :v:[/QUOTE]
I was joking man,
seriously though check out msvc++ express edition: [url]http://www.microsoft.com/express/Downloads/[/url]
[QUOTE=PvtVain;26094595]Can anyone recommend me a compiler for C++ to turn them into a program.[/QUOTE]
Use GCC?
Sorry, you need to Log In to post a reply to this thread.