SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
please help, cos im fookin stuck.
What are the data structures, cos i have to write things about them and i have NO CLUE.
before anyone says, i have already tried Google and a few others.
HELP
Steve.
|
Hillzlo
Member
Registered: 9th Nov 02
Location: Noitacol
User status: Offline
|
www.whatis.com ?
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
sorry dude, that didn't really help all that much.
Anyone else????
Steve
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
depends wot kinda data structure ur after.
i found this
http://www.nist.gov/dads/HTML/datastructur.html
i've jus finished java for the yr its a bastard
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
many thanx john.
Will ripp some of this off as my own
Steve.
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
thats all we do
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
Tis a wicked site mate, thanx again.
I owe you
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
no probs i wanna here ur install
i just found it on google that site, my notes from uni were too long
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
you going up PV2003 or Maxlive??
Cos im up at both of them, as well as Hemel @ the end of this month.
Steve.
Oh also, while your still online. i have another question. WTF is.
Commented listing of your java source code, implementing your chosen scenario.
Eh??
Steve.
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
isn't that like eg: // declaring int a
comments as in the end of lines of code so u know wots goin on
jus a guess like c++
nah not sure on pv2003, would b fun. otherwise donny south or yeah mayb hemmel that sounds fun
[Edited on 09-06-2003 by John_C]
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
just means commenting out your code, to show other programmers what bits do
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
OK wicked, how about this then........
Description of your implemented classes, together with a diagram clearly showing the class hierarchy and interaction, and specifications of each class.
Again WTF????
Steve
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
have u done n e java or c++ this yr
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
Yeah, got a merit in C and C++, just dont understand Java for some reason.
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
u use classes in c++, a class is a step on from a struct except unless specified its private. members which r private can only b accessed by member functions
thats the gist n e way
i'm glad u've done sum cause i haven't well a bit. c++ sucks
[Edited on 09-06-2003 by John_C]
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
could you go a bit more in depth.??
Pretty please I will let you have a ride in my car.
Steve
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
linked lists suck in C++, still cant fully understand em! last assignment blagged a bit i think
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
a class is a bit like a function but is declared at the start of the program a class has private (maybe) or protected variables and the function code is written in the public section, i shall have a look for some C++ example i wrote, may be some help to ya
|
John_C
Member
Registered: 5th Mar 03
Location: South east, Bromley
User status: Offline
|
i'm looking at my notes there in pdf i can't copy and paste, its longgggg
classes r used mainly today instead of structs
cheers other ppl, snowy man get reading sum notes
[Edited on 09-06-2003 by John_C]
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
PLease help more.
its the last thing and then i have finidhed for the year.
PPPLLLEEEAAASSSEEE
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
/*
Program Saved As: cardObj.cpp
Written By: Mike
Date: 27/02/2003
Program Purpose: cards as objects
*/
#include <iostream>
using namespace std;
const int JACK = 11;
const int QUEEN = 12;
const int KING = 13;
const int ACE = 14;
enum Suit { clubs, diamonds, hearts, spades };
class Card{
private:
int number; //cards have two attributes their suit and value
Suit suit;
public:
Card()
{ } //empty constuctor which does nothing
Card(int n, Suit s):number(n), suit(s)
{ }
void display();
bool isEqual (Card);
};
void Card::display()
{
if((number>=2) && (number<=10))
cout << number << " Of ";
else
switch(number)
{
case JACK: cout << "Jack Of ";
break;
case QUEEN: cout << "Queen Of ";
break;
case KING: cout << "King Of ";
break;
case ACE: cout << "Ace Of ";
break;
}
switch(suit)
{
case clubs: cout << "Clubs \5";
break;
case diamonds: cout << "Diamonds \4";
break;
case hearts: cout << "Hearts \3";
break;
case spades: cout << "Spades \6";
break;
}
}
bool Card::isEqual(Card c2)
{
return ((number==c2.number)&&(suit==c2.suit));
}
int main()
{
Card temp, chosen, prize;
int position;
Card card1(7, clubs);
cout << "\nCard 1 Is The ";
card1.display();
Card card2(JACK, hearts);
cout << "\nCard 2 Is The ";
card2.display();
Card card3(ACE, spades);
cout << "\nCard 3 Is The ";
card3.display();
prize=card3;
cout << "\nI'm Swapping Card 1 and 3";
temp=card3;
card3=card1;
card1=temp;
cout << "\nI'm Swapping Card 2 and 3";
temp=card3;
card3=card2;
card2=temp;
cout << "\nI'm Swapping Card 1 and 2";
temp=card2;
card2=card1;
card1=temp;
cout << "\nNow, Where (1,2 or 3) Is The ";
prize.display();
cout << "? ";
cin >> position;
switch (position)
{
case 1: chosen=card1;
break;
case 2: chosen=card2;
break;
case 3: chosen=card3;
break;
}
if(chosen.isEqual(prize))
cout << "**** You Win! ****";
else
cout << "Sorry, You Lose!";
cout << "You Chose The: ";
chosen.display();
cout << endl;
return 0;
}
may be of some help, is quite simple you can see the class and how it works, hopefully
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
Why thankyou Mike.
you think if i sent you my Java program, which isn't working.
You could sort it out. there are 15 errors. And i dont know what they are.
Steve
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
i dont have a Java compiler mate! downloading one from sun isnt an option as im on dialup! LOL sorry mate, i have C++ compiler
|
SteveW
Member
Registered: 15th Jul 02
Location: Up in the clouds
User status: Offline
|
Oh well it was worth a try
Really stuck, have no idea what im doing now
|
Mikorsa16v
Member
Registered: 2nd Sep 02
Location: Burgess Hill, West Sussex
User status: Offline
|
can any one else help steve?
what about a book from amazon? jus a thought
|