Introduction
In only one and a half semesters, I can already tell that most college professors are ridiculous. But, up until now, I haven’t had any that were so ridiculous that I felt the need to write about them. Enter my C++ professor this semester. I wrote this simple program very quickly, because I’ve had C++ before, but it took my easily twice as long to comment every freaking line. That’s absurd. As if the graders don’t know what’s going on and as if I don’t know—I wrote it, after all. I mean, just look at that code—it’s ridiculous.
QED
[sourcecode language='cpp'] /************************************************/ /* Widget Inc. Weekly Production Report / / Logan Leger / / CSC 125331 Section 1 / / Assignment 2 / / Instructor: Douglas / / Program due date: Feb 3, 2009 / /***********************************************/
/************************************************/ /* Problem specification: Create a method / / for making a weekly production / / report for widgets / / / / Problem analysis: Get user input for / / produced widgets and computer / / report and show data / / / / Inputs: Number of widgets made each week/ / from site 1, site 2 and site 3 / / / / Outputs: Number of widgets from each / / site; production cost and total / / earnings of each site; / / overall number of widgets produced; / / overall average units of each site; / / overall total production cost; / / overall expected earnings / /***********************************************/
include
using namespace std;
int main () { int counter = 1; //counter for counter-control repetition structure int widgets = 0; //number of widgets for use in aforementioned counter-countrol repetition structure double prod_cost = 0; //total production cost per site for use in said structure double earnings = 0; //total earnings per site for use in said structure int total_widgets = 0; //total widgets produced; sum of site1, site2 and site3 int average_widgets = 0; //average widgets produced; sum divided by three double total_prod_cost = 0; //total production cost; sum of each prod_site double total_earnings = 0; //total earnings; sum of each earnings_site const double PROD_COST = 2.59; //the cost to build each widget const double SELL_PRICE = 5.99; //the selling price of each widget const int i = 3; //number of iterations = 3
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
//above action statements format all number output to two digits--for showing it in price format
cout < < "\nWelcome to Widgets Inc Weekly Production Report System.\nPlease input the number of widgets produced per site.";
//welcome message
while (counter <= i) {
cout << "\nNumber of widgets for Site " << counter << ": ";
//print heading for each site
cin >> widgets;
//input number of widgets
prod_cost = widgets * PROD_COST;
//compute production cost of site
earnings = widgets * SELL_PRICE;
//compute earnings of site
cout << "\n" << "Site " << counter << ":" << endl << "Production Cost: $" << prod_cost << endl << "Expected Earnings: $" << earnings << endl;
//output the information of the site
total_widgets += widgets;
//add up total widgets
total_prod_cost += prod_cost;
//add up production cost
total_earnings += earnings;
//add up earnings
counter++;
//increase counter for loop
cout << "\n";
//make the monkey go up the tree and bring down coconut
}
average_widgets = total_widgets/3;
//compute average widgets
cout << "Widgets Inc Weekly Executive Report\n" << endl;
cout << "Overall total widgets produced: " << total_widgets << endl;
cout << "Overall average widgets produced: " << average_widgets << endl;
cout << "Overall total production cost: $" << total_prod_cost << endl;
cout << "Overal total expected earnings: $" << total_earnings << endl;
cout << "\n";
//above block of code prints the executive report
cout << "End of the weekly report." << endl;
//sign-off message -- operation take over the world complete
return 0;
} [/sourcecode]
that’s ridiculous
I realized this semester was going to be interesting when my chemistry professor told us that we didn’t really need the book, he would just give us a general topic to read about. Nothing tops my Music Appreciation class though. The professor literally said “Music is candy for your ears. Can you feel it in there?” He then proceeded to put his finger in a student’s ear.
. . . Wow.
Ouch. Computer Science classes are horrible, especially at LSU. Assembly is even worse.
I’m really hoping it gets better. Since I’m a computer engineering student, I have to take lots of them. If they’re even close to being as ridiculous, then I might just go insane. I mean, this is seriously ridiculous.