Go Back   DriverHeaven.net > Forums > Software / Tools > Programming, Coding, (Web)Design

Notices

Reply
 
LinkBack Thread Tools Display Modes
Old Sep 1, 2004, 09:26 PM   #1 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

i have the world's easiest CS class

it's official...i have the world's easiest CS class ever. it's java based, btw...but here is our 'project', including the 'harder' option and the extra credit

Code:
 import cs1.Keyboard;
 import java.text.DecimalFormat;
 
 public class Project1
 
 
 
 {
 
 	public static void main (String[] args)
 
 	{
 
 		final int speed = 2;
 
 		int yl, yw, hl, hw, ya, ha, ga;
 		float ttms, ttmm;
 
 		System.out.println ("Enter the length of the yard:");
 
 		yl = Keyboard.readInt();
 
 		System.out.println ("Enter the width of the yard:");
 
 		yw = Keyboard.readInt();
 		System.out.println ("Enter the length of the house:");
 
 		hl = Keyboard.readInt();
 		System.out.println ("Enter the width of the house:");
 
 		hw = Keyboard.readInt();
 		ha = hl*hw; //house area
 		ya = yl*yw; //yard area
 		ga = ya-ha; //grass area
 		ttms = ga/speed; //time to mow in seconds
 		ttmm = ttms/60; //time to mow in minutes
 		DecimalFormat threeDecPlcFormatter = new DecimalFormat("0.000");
 		System.out.println("The house dimensions were: " + hl + "x" + hw + " for an area of " + ha + " square feet.");
 		System.out.println("The yard dimensions were: " + yl + "x" + yw + " for an area of " + ya + " square feet.");
 		System.out.println("The area covered by grass is :" + ga + " square feet.");
 		System.out.println("It would take " + ttmm + " minutes to mow.");
 		System.out.println("Or, taken to 3 decimal places " + threeDecPlcFormatter.format(ttmm) + " minutes to mow.");
 	}
 }
pr0digal jenius is offline   Reply With Quote
Old Sep 2, 2004, 12:29 AM   #2 (permalink)
Vampyromaniac
confutatis maledictis
 
Vampyromaniac's Avatar
 
Join Date: May 2002
Location: somewhere dark
Posts: 5,952
Vampyromaniac is on a distinguished road
System Specs

yeah that is simple, did you just start? and is it the first class in CS? I think it gets harder later
__________________
Digitalis 3.3
Athlon 64 3000 // ASUS K8V SE Deluxe // 1024MB PC3200 (2-2-2-10 1T)
ATI All-In-Wonder 9700 Pro // 20" Dell 2005FPW (DVI)
M-Audio Revo 7.1 + Philips Acoustic Edge // Klipsch ProMedia 2.1
320/16 Western Digital WD3200KS + 120/8 Seagate 7200.7
NEC ND-3550A 16x DVD±RW + Lite-On 52x24x CD-RW
Antec Sonata case // 480W Antec TruePower

personal bests || Aq'3: 46796 | 3D'01: 20461 | 3D'03: 6336 | 3D'05: 2677 | PC'04: 4605 | PC'02: 7691,9092,1250

Vampyromaniac is offline   Reply With Quote
Old Sep 2, 2004, 01:12 AM   #3 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

no, supposedly this is the 2nd...i skipped the 1st one

and the rest of my class is kinda dim at times...like not knowing how to login to windows 2000
pr0digal jenius is offline   Reply With Quote
Old Sep 2, 2004, 10:09 AM   #4 (permalink)
Malus
BSD SMASH!
 
Malus's Avatar
 
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,169
Malus is on a distinguished road

It better get harder.

So far, I hsven't done a vast array of cool stuff in college, but I have written an AI for Scrabble (in Java), a few different solutions to the satisfiability problem, including WalkSAT, and a CMS in PHP/MySQL.

You usually don't do the cool stuff until you take restricted electives or upper level courses.
__________________
Quad (FreeBSD/amd64 7-STABLE): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5

Kalimdor (FreeBSD/i386 7-STABLE):
Opteron 148 2.2 Ghz - Asus A8V-MX - 2 GB PC3200 Corsair XMS Ram - Lite-On 48x24x48x16 - Seagate 120GB 7200RPM HD - Antec SLK3700AMB

Wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p

Mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram -
Headroom MicroDAC

Portable sound = Rockboxed iPod Video -> Westone UM2's
Not-So-Portable Sound = Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's
Malus is offline   Reply With Quote
Old Sep 2, 2004, 01:04 PM   #5 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

yea...it'll get lots harder come next year anbd the year after...i just want it to get harder faster b4 i fall asleep
pr0digal jenius is offline   Reply With Quote
Old Sep 2, 2004, 04:17 PM   #6 (permalink)
craig5320
DH Administrator
 
craig5320's Avatar
 
Join Date: May 2002
Location: Manchester, UK
Posts: 4,486
craig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refutecraig5320 has a reputation beyond refute
System Specs

Yea I had that in a module last year, teaching us html, I'm not even talking XHTML or remotely complicated. table's were the most complicated tag we hit, pity I learned html bout 6 years ago
__________________
craig5320 is offline   Reply With Quote
Old Sep 2, 2004, 05:50 PM   #7 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

yea, i learned a good bit of java about 2-3 years ago..so this is sad and pathetic...lol
pr0digal jenius is offline   Reply With Quote
Old Feb 15, 2005, 01:13 AM   #8 (permalink)
Callandor
Pool Shark
 
Callandor's Avatar
 
Join Date: Oct 2004
Location: Quicksand
Posts: 3,153
Callandor will become famous soon enough
System Specs

I feel sorry for you pj, LOL, but then again, I'll be in the same boat as well next year.
__________________

Callandor is online now   Reply With Quote
Old Feb 15, 2005, 04:51 AM   #9 (permalink)
md5
DriverHeaven Senior Member
 
md5's Avatar
 
Join Date: Dec 2004
Location: Inside DriverHeaven
Posts: 856
md5 is on a distinguished road

*sigh* reminds me of my first semester in CS... everything was much simpler then
__________________
md5 is offline   Reply With Quote
Old Feb 15, 2005, 04:17 PM   #10 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

it's gotten a LITTLE harder now(new semester)...but the hardest thign we've hit yet is a very little bit of inheritance, such as using the 'super' / 'extends' command
pr0digal jenius is offline   Reply With Quote
Old Feb 15, 2005, 04:39 PM   #11 (permalink)
Geminiwave
I Have lovely Breasts
 
Geminiwave's Avatar
 
Join Date: Jul 2004
Location: In the closet...
Posts: 5,394
Geminiwave has a spectacular aura aboutGeminiwave has a spectacular aura about

dude when I read the topic title I thought "They offer Counter-Strike classes?! what?! SIGN ME UP!!!"
__________________
Geminiwave is offline   Reply With Quote
Old Feb 16, 2005, 01:18 PM   #12 (permalink)
StuRReaL
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Derby UK
Posts: 78
StuRReaL is on a distinguished road

Quote:
Originally Posted by pr0digal jenius
it's gotten a LITTLE harder now(new semester)...but the hardest thign we've hit yet is a very little bit of inheritance, such as using the 'super' / 'extends' command
oooo you're in for a treat next then, if you want hard then have a look at polymorphism assuming you don't know about it already but if you find it easy then surely thats a good thing it means you'll pass really easily with A+ all the way
__________________
AMD Athlon64 X2 4200+
1GB OCZ Platinum
x2 74Gb WD Raptors RAID0
256mb Radeon X1300
Sapphire Pure Innovation
M-Audio Revolution 7.1
Windows XP x64 Edition
StuRReaL is offline   Reply With Quote
Old Feb 18, 2005, 12:31 PM   #13 (permalink)
YAYitsAndrew
Your Inner Child
 
YAYitsAndrew's Avatar
 
Join Date: Oct 2004
Location: NJ
Posts: 2,354
YAYitsAndrew will become famous soon enough
System Specs

Polymorphism is nothing. Just wait until you're writing your own compiler for a small subset of the pascal language. And it's 80% of your grade.
YAYitsAndrew is offline   Reply With Quote
Old Feb 18, 2005, 12:39 PM   #14 (permalink)
pr0digal jenius
Delete Me
 
Join Date: Mar 2004
Posts: 14,676
pr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to allpr0digal jenius is a name known to all

lol...we're not quite to polymorphism yet...that comes in a few weeks
pr0digal jenius is offline   Reply With Quote
Old Feb 19, 2005, 06:23 AM   #15 (permalink)
StuRReaL
DriverHeaven Junior Member
 
Join Date: Jul 2002
Location: Derby UK
Posts: 78
StuRReaL is on a distinguished road

Quote:
Originally Posted by YAYitsAndrew
Polymorphism is nothing. Just wait until you're writing your own compiler for a small subset of the pascal language. And it's 80% of your grade.
Yeah ok thats hard, thats not something i'd ever consider doing, for fun or for a module on course
__________________
AMD Athlon64 X2 4200+
1GB OCZ Platinum
x2 74Gb WD Raptors RAID0
256mb Radeon X1300
Sapphire Pure Innovation
M-Audio Revolution 7.1
Windows XP x64 Edition
StuRReaL is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump