1. ## Homework

Sets and Tuples.

They are different, right?

I mean, the elements in a set are not ordered, and the elements in a tuple are ordered.

- - - - - - - Sets - - - - - - - - - - - - - - - - Tuples - - - - - - -
{1, 2, 3, 4} = {1, 3, 2, 4} but (1, 2, 3, 4) <> (1, 3, 2, 4)

So, if I am presented with a group of sets, curly braces and all, and asked which are ordered sets, my answer is none, right?

Since by definition, sets are unordered.

Or did I miss something?

2. While looking at how set theory ties in with relational databases, I realized that the columns in tables are sets. Yeah, I know. Most of you are looking at me like I said water is wet, but this is something new to me. I was looking at the obvious, that a record was a set of related fields, and a table is a set of related records. Then I fixed on the word 'related'. Each column is a set of items of the same type. A set of last names, a set of ID numbers, a set of birthdays, etc.

When I cross all of these sets (columns) in a table, I get a Cartesian product that is the set of all ordered combinations of these sets. Every record is an element of, and a subset of, said Cartesian product, and a subset of a Cartesian product is called a relation.

Enough homework for now; my head is starting to hurt.

3. Originally Posted by Tscheuss
While looking at how set theory ties in with relational databases, I realized that the columns in tables are sets. Yeah, I know. Most of you are looking at me like I said water is wet, but this is something new to me. I was looking at the obvious, that a record was a set of related fields, and a table is a set of related records. Then I fixed on the word 'related'. Each column is a set of items of the same type. A set of last names, a set of ID numbers, a set of birthdays, etc.

When I cross all of these sets (columns) in a table, I get a Cartesian product that is the set of all ordered combinations of these sets. Every record is an element of, and a subset of, said Cartesian product, and a subset of a Cartesian product is called a relation.

Enough homework for now; my head is starting to hurt.
You expect me to remember stuff I studied 20 years ago? Do I look like a university professor to you?

Thanks! I've been wanting to use the rolleyes smilie for ages.

4. Originally Posted by Hazelnut
You expect me to remember stuff I studied 20 years ago? Do I look like a university professor to you?

Thanks! I've been wanting to use the rolleyes smilie for ages.
20 years ago?!? Why, that means you're... erm... let's see...
carry the 3?

*takes off socks

Um, maybe I should just forget the math. I mean, I mustn't get distracted from my homework.

Yeah, that's it. I need to go do my homework.

5. ## Java? But I don't like coffee.

Okay. I got the hang of objects in general, and classes. I know they are the same, but different. So, classes hold the methods and properties that belong to the objects they represent. Inheritance is simple; we covered that in biology - dog is mammal is vertebrate...

I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.

I'm pretty sure that is still illegal in some states.

6. Originally Posted by Tscheuss

I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.

I'm pretty sure that is still illegal in some states.

Java question: http://javapapers.com/core-java/why-...orted-in-java/

Polymorphism = illegal only if you get caught.

7. ## This one I can answer.

Originally Posted by Tscheuss
Okay. I got the hang of objects in general, and classes. I know they are the same, but different. So, classes hold the methods and properties that belong to the objects they represent. Inheritance is simple; we covered that in biology - dog is mammal is vertebrate...
A class is a definition of something that doesn't exist yet. An object is the existence of the thing that is defined by a class. Does that make sense?

Originally Posted by Tscheuss
I need to keep reading to find out why Java doesn't have multiple inheritance, while C++ does.
Because Java is broken, badly broken.

Originally Posted by Tscheuss

I'm pretty sure that is still illegal in some states.
Yes. It should be illegal globally.

Once upon a time, a programmer wrote everything in machine language (ya, binary). Then they got lazy and created this thing called automatic programming which later got renamed to assembly language (no, I'm not kidding). Then they got sick of repeating bits of assembly and created macro assembly. Then some bright guys decided to bundle together a bunch of macros to make things even easier and called it "B" (really). "B" was okay but they wanted it to go a bit further, so they added some more complexity to the "macros" and called their new language "C". Then things started to get weird.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

This form's session has expired. You need to reload the page.