Date: 19/10/2018 17:50:16
From: Lary
ID: 1290839
Subject: Class Definition for Java

I’m working on an assignment and need to define terms we’ve learned along the way. Things like “while, do while, for”, or “main ()method”.
I need to define the term “class (custom data type)”. I’ve been reading the course material, web pages, talking to class mates for a few hours and not getting any closer to a coherent understanding of the term.
Is any one able to explain this term to me?

This is what I’ve written so far for class (custom data type);

Classes are often called blueprints for objects. A class will define the parameters of an object, how it can be used, etc.
The Java language contains many predefined classes, such as the Math class (which contains terms such as Math.Pi and methods for more complex mathematical functions than basic addition, subtraction, multiplication and division). “

This is what I’ve written for another term (so you understand I’m actually trying to get my own work done);


10 – While, Do While, For
While, Do While and For are all looping functions.
While and Do While are very similar. While checks the condition to run prior to running and Do While checking the condition after running at least once.
While and Do While will run until a defined condition is met. The condition may be set by a counter, a logical condition, etc.
For loops are set to run until a counter condition is met, ie. a For loop will run a predefined number of times. The counter can be set as an independent declared variable, or as a dependant variable.
For and While loops were used in 4.2PP. The For loop was used to underline headings with an equivalent line of symbols (dependant variable) and the While loop was used to ask for answers to simple multiplication problems until a sufficient number of correct answers were given (counter condition).

I made this into a thread for ease of tracking. I also updated what I’ve written so far.

Reply Quote

Date: 19/10/2018 17:50:51
From: Lary
ID: 1290841
Subject: re: Class Definition for Java

btm responded with

I’m not quite sure exactly what you’re trying to define (with class (custom data type)), and I don’t know Java very well, but I do know c++. Assuming you want a definition of class, I’d say (from c++) that it’s a set of data types with something in common, with a set of funcions that act on those data type (usually exclusively); as you say, it defines the object. There’s a whole bunch of other stuff, like inheritance, you could pile on top, but that’s a reasonable definition. Your definitions of the loop controllers seems OK.

Reply Quote

Date: 19/10/2018 18:15:50
From: Lary
ID: 1290852
Subject: re: Class Definition for Java

I’ve crossed out everything and come up with this, which seems more relevant to the topic


When creating a class, the types of data to be used are declared also. For example, a class that calculates the mass of a cube might be declared CubeMass(int side, int density).
The int side and int density are the variables required to calculate the mass of any given solid cube.

Reply Quote

Date: 19/10/2018 18:20:22
From: sarahs mum
ID: 1290865
Subject: re: Class Definition for Java

Lary said:


I’ve crossed out everything and come up with this, which seems more relevant to the topic


When creating a class, the types of data to be used are declared also. For example, a class that calculates the mass of a cube might be declared CubeMass(int side, int density).
The int side and int density are the variables required to calculate the mass of any given solid cube.

I don’t like a sentence that ends with ‘also.’ Whoops, I did it again.

Reply Quote

Date: 19/10/2018 18:51:43
From: Lary
ID: 1290880
Subject: re: Class Definition for Java

I’ve submitted the assignment. If it’s wrong, I get feedback and a chance to correct.


Classes are often called blueprints for objects. A class will define the parameters of an object, how
can be used, etc.
The Java language contains many predefined classes, such as the Math class (which contains term
such as Math.Pi and methods for more complex mathematical functions than basic addition,
subtraction, multiplication and division).

When creating a class, the types of data to be can be declared also. For example, a class that
calculates the mass of a cube might be declared CubeMass(int side, int density).
The int side and int density are the variables required to calculate the mass of any given solid cube
Custom Data Types were used in 4.2PP, eg. “ runTutorial(Scanner in, int max, int mustSolve) “

le sigh.
Calculus is easier to learn than basic programming.

Reply Quote

Date: 19/10/2018 18:55:53
From: Tau.Neutrino
ID: 1290882
Subject: re: Class Definition for Java

Good explanation of classes here

https://www.quora.com/What-is-the-meaning-of-class-in-programming

Reply Quote

Date: 19/10/2018 18:57:07
From: sibeen
ID: 1290884
Subject: re: Class Definition for Java

Lary said:


I’ve submitted the assignment. If it’s wrong, I get feedback and a chance to correct.


Classes are often called blueprints for objects. A class will define the parameters of an object, how
can be used, etc.
The Java language contains many predefined classes, such as the Math class (which contains term
such as Math.Pi and methods for more complex mathematical functions than basic addition,
subtraction, multiplication and division).

When creating a class, the types of data to be can be declared also. For example, a class that
calculates the mass of a cube might be declared CubeMass(int side, int density).
The int side and int density are the variables required to calculate the mass of any given solid cube
Custom Data Types were used in 4.2PP, eg. “ runTutorial(Scanner in, int max, int mustSolve) “

le sigh.
Calculus is easier to learn than basic programming.

ROFL

Please give the derivitive of:

Reply Quote

Date: 19/10/2018 19:16:33
From: Lary
ID: 1290889
Subject: re: Class Definition for Java

sibeen said:

ROFL

Please give the derivitive of:


Yeah, I looked at this the other day, but forgot to do the problem.
I need to write an outline for my next assignment, and I will try and look a this over the weekend.
It should be a combo of chain/product/quotient rules.

First step is to rewrite it as y= (1-a(t^-4))/(1+a(t^3/2))
That should make it possible to start deriving. You are probably already past this point though.

Reply Quote

Date: 19/10/2018 19:20:52
From: sibeen
ID: 1290891
Subject: re: Class Definition for Java

Lary said:


sibeen said:

ROFL

Please give the derivitive of:


Yeah, I looked at this the other day, but forgot to do the problem.
I need to write an outline for my next assignment, and I will try and look a this over the weekend.
It should be a combo of chain/product/quotient rules.

First step is to rewrite it as y= (1-a(t^-4))/(1+a(t^3/2))
That should make it possible to start deriving. You are probably already past this point though.

Lary, just kidding with you. It was my daughter’s homework. I eventually worked through it :)

Reply Quote

Date: 20/10/2018 09:13:12
From: Peak Warming Man
ID: 1291099
Subject: re: Class Definition for Java

I found programming easy mainly because it is logical, it has to be.

Reply Quote

Date: 20/10/2018 10:27:26
From: sarahs mum
ID: 1291120
Subject: re: Class Definition for Java

Peak Warming Man said:


I found programming easy mainly because it is logical, it has to be.

I wrote a program in COBOL once. I had to punch 850 odd cards. I found the process laborious and a drag.

Reply Quote

Date: 20/10/2018 10:54:12
From: SCIENCE
ID: 1291122
Subject: re: Class Definition for Java

L
O
L

Reply Quote