|
| Notices |
Welcome to the DriverHeaven.net forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
 |
|
Sep 1, 2004, 09:26 PM
|
#1 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
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.");
}
}
|
|
|
Sep 2, 2004, 12:29 AM
|
#2 (permalink)
|
|
confutatis maledictis
Join Date: May 2002
Location: somewhere dark
Posts: 5,952
|
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
|
|
|
Sep 2, 2004, 01:12 AM
|
#3 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
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 
|
|
|
Sep 2, 2004, 10:09 AM
|
#4 (permalink)
|
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,169
|
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
|
|
|
Sep 2, 2004, 01:04 PM
|
#5 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
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 
|
|
|
Sep 2, 2004, 04:17 PM
|
#6 (permalink)
|
|
DH Administrator
Join Date: May 2002
Location: Manchester, UK
Posts: 4,486
|
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
__________________
|
|
|
Sep 2, 2004, 05:50 PM
|
#7 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
yea, i learned a good bit of java about 2-3 years ago..so this is sad and pathetic...lol
|
|
|
Feb 15, 2005, 01:13 AM
|
#8 (permalink)
|
|
Pool Shark
Join Date: Oct 2004
Location: Quicksand
Posts: 3,153
|
I feel sorry for you pj, LOL, but then again, I'll be in the same boat as well next year. 
|
|
|
Feb 15, 2005, 04:51 AM
|
#9 (permalink)
|
|
DriverHeaven Senior Member
Join Date: Dec 2004
Location: Inside DriverHeaven
Posts: 856
|
*sigh* reminds me of my first semester in CS... everything was much simpler then
__________________
|
|
|
Feb 15, 2005, 04:17 PM
|
#10 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
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 
|
|
|
Feb 15, 2005, 04:39 PM
|
#11 (permalink)
|
|
I Have lovely Breasts
Join Date: Jul 2004
Location: In the closet...
Posts: 5,394
|
__________________
|
|
|
Feb 16, 2005, 01:18 PM
|
#12 (permalink)
|
|
DriverHeaven Junior Member
Join Date: Jul 2002
Location: Derby UK
Posts: 78
|
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
|
|
|
Feb 18, 2005, 12:31 PM
|
#13 (permalink)
|
|
Your Inner Child
Join Date: Oct 2004
Location: NJ
Posts: 2,354
|
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.
|
|
|
Feb 18, 2005, 12:39 PM
|
#14 (permalink)
|
|
Delete Me
Join Date: Mar 2004
Posts: 14,676
|
lol...we're not quite to polymorphism yet...that comes in a few weeks
|
|
|
Feb 19, 2005, 06:23 AM
|
#15 (permalink)
|
|
DriverHeaven Junior Member
Join Date: Jul 2002
Location: Derby UK
Posts: 78
|
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
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
| |