We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [data-types]

A data type is a classification which tells the computer how the program intends to use the data. Use for questions about instruction that involves type (boolean, string, integer, etc).

Filter by
Sorted by
Tagged with
25
votes
9answers
5k views

Once implicit/inferred typing is introduced, how can I impress upon students the importance of not abusing it?

I typically have the same students two semesters in a row, for programming I (VB.NET) and programming II (C#). In our early, impressionable time together, I stress to these students (high-schoolers) ...
7
votes
7answers
443 views

Explaining to students why to use double instead of float (unless there's a very good reason)

I keep seeing students use float in lab lessons: For example, a simple physics calculation of kinematics. Many, many students use ...
7
votes
5answers
125 views

Breaking down the operations when auto-casting gets complex

So, take a Java statement like this one, given some int n: if ((n+"").length() == (((n+1)+"").length())) { Or perhaps this ...
6
votes
3answers
391 views

Teaching “CS integer” vs. “math integer”

The concept of an integer data type is not equivalent to the math concept of the set of integers. For example, in many programming languages the expressions 3. and $...
4
votes
1answer
102 views

Example for Introduction to Generics in Java

What are some good example classes for introducing generics in Java? I'm introducing this in the context of implementing ArrayList, but I don't want my first ...
3
votes
2answers
290 views

Abstract data type that has “include” “remove” and “is in” and only those

In a data structures course, we see trees, balanced trees, hash tables. These have an important thing in common: we can use them to keep a collection of elements (with operations add and remove) and ...
1
vote
2answers
57 views

Data and Database modelling books

I need a suggestion for books for my University. I have a subject called "Data and database modeling" but we lack of books. Our professor gave as barely understandable scripts. This is an official ...