Type Description and example use
**You must provide an example of what each data type could be used for**
String A data type used in programmings such as an integer and floating point unit, but is used to represent text rather than numbers.
• I bought 3 CD’s which were from 3 different artists. It shows that I bought it from 3 different people.
• If (Option 1==Option 2) If the values are the same, then it is true. If they are different, then it is false.
• Usernames are an example of string data type.
Integer A data type which consists of a whole number. Examples would be numbers 1-10.
• Addition, subtraction, multiplication, division are examples when integer data types are used. When the integer is added, subtracted, multiplied or …show more content…
It basically stores the date.
• Date on the lock screen for the iPhone or a Samsung smartphone device, used in digital calendars.
Boolean A data type which has two values intended to represent the truth values of logic and Boolean algebra.
• Used in True/False statements.
Single A 4-byte data type which includes a floating point up to a definite amount. It holds up to 7 digits.
• Shouldn’t be used for currency as the decimals will represent a lower number and it isn’t exactly a big number.
• Used as a number up to 7 digits. If the number does not have 7 digits, it will be rounded to have a format of 7 digits. An example is with the value 1.23456789. As you can see, it exceeds 7 digits and so is rounded to 1.234568.
• Used for decimals as the pre-set value.
Double An 8 data type which can hold 14 digits compared to a single data type.
• Used for defining big amounts e.g. £65k can be known as £65000 and it shows that not all the data values are within the numerical value of 65k and can show an easier way of writing code to help with memory management. Basically, it is simplifying the code.
Fixed Point A data type which represents a real data for a number that has a fixed number of digits after the decimal