Boyah Forums

General => The Lobby => Topic started by: Sam on October 27, 2009, 09:24:37 AM

Title: aren't you proud of me Boyah?
Post by: Sam on October 27, 2009, 09:24:37 AM
I somehow managed to pass my Computer Science class with a C despite my grade being a 51. Magic. So now I have the privilege of taking another CS class. Look what I learned to do!

Quote//the reciept for a coffee sale
class Coffee {
 String kind;
 int price; // cents per pound
 int weight; // pounds
 Coffee(String kind, int price, int weight){
   this.kind = kind;
   this.price = price;
   this.weight = weight;
 }
}


I am unstoppable.  wariodood;
Title: Re: aren't you proud of me Boyah?
Post by: Thyme on October 27, 2009, 09:28:56 AM
Code Select
window.alert("yes sam i'm proud of you n_u");
Title: Re: aren't you proud of me Boyah?
Post by: YPrrrr on October 27, 2009, 09:31:13 AM
Er... well congrats again on passing. I have no idea what you learned to do though
Title: Re: aren't you proud of me Boyah?
Post by: ME## on October 27, 2009, 09:33:23 AM
Your professor must have liked you?  n_u
Title: Re: aren't you proud of me Boyah?
Post by: Daddy on October 27, 2009, 09:42:46 AM
You learned to initialize null variables and create a constructor?  akudood;
Title: Re: aren't you proud of me Boyah?
Post by: Sam on October 27, 2009, 10:15:16 AM
Quote from: Ensign Halibar on October 27, 2009, 09:42:46 AM
You learned to initialize null variables and create a constructor?  akudood;

yes?  n_u

how do I create instances for this? I am lost.  baddood;
Title: Re: aren't you proud of me Boyah?
Post by: Daddy on October 27, 2009, 10:27:32 AM
Quote from: Sam on October 27, 2009, 10:15:16 AM
yes?  n_u

how do I create instances for this? I am lost.  baddood;
uh i haven't really worked with classes in c but in java ou'd do something like


Coffee espresso = new Coffee("Espresso", 15, 1);


then if you had other methods in that class you could do like


espresso.addDiscount(10);
or
espresso.addFlavor("Hipster Deluxe");


Also you might have get or set methods idklol

espresso.getPrice();

inwich you have a function like


getPrice()
{
return price;
}
Title: Re: aren't you proud of me Boyah?
Post by: Andria on October 27, 2009, 10:49:36 AM
its like you guys are speaking another language baddood;

anyways grats on getting a c instead of an f
Title: Re: aren't you proud of me Boyah?
Post by: Sam on October 27, 2009, 10:55:11 AM
Quote from: Ensign Halibar on October 27, 2009, 10:27:32 AM
uh i haven't really worked with classes in c but in java ou'd do something like


Coffee espresso = new Coffee("Espresso", 15, 1);


then if you had other methods in that class you could do like


espresso.addDiscount(10);
or
espresso.addFlavor("Hipster Deluxe");


Also you might have get or set methods idklol

espresso.getPrice();

inwich you have a function like


getPrice()
{
return price;
}


That's what I've been trying to do but it doesn't work.

BAH.
Title: Re: aren't you proud of me Boyah?
Post by: Daddy on October 27, 2009, 11:08:54 AM
Quote from: Sam on October 27, 2009, 10:55:11 AM
That's what I've been trying to do but it doesn't work.

BAH.
Are you using actual C or C#/C++ because iirc c isn't really greatly supportive of oop.


do you have a link to a lesson or anything
Title: Re: aren't you proud of me Boyah?
Post by: Sam on October 27, 2009, 11:10:27 AM
Quote from: Ensign Halibar on October 27, 2009, 11:08:54 AM
Are you using actual C or C#/C++ because iirc c isn't really greatly supportive of oop.


do you have a link to a lesson or anything

wait, what? I'm using java, sillycakes.
Title: Re: aren't you proud of me Boyah?
Post by: Mando Pandango on October 27, 2009, 11:12:44 AM
I remember when I understood basic Java. Ah, to be young again.
Title: Re: aren't you proud of me Boyah?
Post by: Sam on October 27, 2009, 11:13:36 AM
OH HEY I FIGURED OUT WHAT I WAS TRYING TO DO.

//collect examples of coffee sales
class CoffeeExamples {
  Coffee kona = new Coffee("Kona",2095,100);
  Coffee ethi = new Coffee("Ethiopian",800,1000);
  Coffee colo = new Coffee("Colombian",950,20);
 
  CoffeeExamples(){
  }                         
}
Title: Re: aren't you proud of me Boyah?
Post by: Travis on October 27, 2009, 11:14:26 AM
i don't know a god damn thing about programming
Title: Re: aren't you proud of me Boyah?
Post by: Daddy on October 27, 2009, 11:50:35 AM
Quote from: Sam on October 27, 2009, 11:10:27 AM
wait, what? I'm using java, sillycakes.
oh i read the grade c as the language.
Quote from: Sam on October 27, 2009, 11:13:36 AM
OH HEY I FIGURED OUT WHAT I WAS TRYING TO DO.

//collect examples of coffee sales
class CoffeeExamples {
  Coffee kona = new Coffee("Kona",2095,100);
  Coffee ethi = new Coffee("Ethiopian",800,1000);
  Coffee colo = new Coffee("Colombian",950,20);
 
  CoffeeExamples(){
  }                         
}
yayyyyyyyyyyyyyyyyyy


where's your constructor
Title: Re: aren't you proud of me Boyah?
Post by: Nyerp on October 27, 2009, 01:05:06 PM
Quote from: Travis on October 27, 2009, 11:14:26 AM
i don't know a god damn thing about programming


i have a barely basic grasp of visual basic .NET :D
Title: Re: aren't you proud of me Boyah?
Post by: Thyme on October 27, 2009, 01:06:25 PM
also james for my homework it was n.toFixed(2) fuck you :'(
Title: Re: aren't you proud of me Boyah?
Post by: LCK on October 27, 2009, 01:08:12 PM
Quote from: Nyerp on October 27, 2009, 01:05:06 PM
i have a barely basic grasp of visual basic .NET :D
:D
Title: Re: aren't you proud of me Boyah?
Post by: Travis on October 27, 2009, 01:09:11 PM
Quote from: Nyerp on October 27, 2009, 01:05:06 PM
i have a barely basic grasp of visual basic .NET :D
I don't even know what you're talking about! :D
Title: Re: aren't you proud of me Boyah?
Post by: Nyerp on October 27, 2009, 01:09:37 PM
Quote from: Trevor on October 27, 2009, 01:08:12 PM
:D


ban'd :O

Quote from: Travis on October 27, 2009, 01:09:11 PM
I don't even know what you're talking about! :D


me either!! :D
Title: Re: aren't you proud of me Boyah?
Post by: Zach on October 27, 2009, 04:14:23 PM
I actually thought about being a computer science major for a few days. Then I woke up and remembered that I hate math.
Title: Re: aren't you proud of me Boyah?
Post by: Sam on October 28, 2009, 07:23:25 AM
Quote from: Ensign Halibar on October 27, 2009, 11:50:35 AM
oh i read the grade c as the language. yayyyyyyyyyyyyyyyyyy


where's your constructor


um

you tell me
Title: Re: aren't you proud of me Boyah?
Post by: Daddy on October 28, 2009, 07:31:38 AM
Quote from: Sam on October 28, 2009, 07:23:25 AM
um

you tell me
idk did you not show me it where is the entire code of that file akudood;
Title: Re: aren't you proud of me Boyah?
Post by: Oh on October 28, 2009, 08:33:16 AM
 //dicks;      8=====D;,()}

  }
}