Defining Data

Description

Flashcards on the SSD AS course from CCEA.
Ruth Hyndman
Flashcards by Ruth Hyndman, updated more than 1 year ago
Ruth Hyndman
Created by Ruth Hyndman over 8 years ago
7
0

Resource summary

Question Answer
What is a primitive data type? A primitive data type is one that is either built into a programming language or could be characterised as a basic structure for building more sophisticated data types.
Give examples of primitive data types and explain what they are. Some examples of primitive data types are integer (whole numbers), double (real numbers allowing decimal points), character (single Unicode characters), boolean (logical values, true or false), byte (8 bits stored), short (16 bits stored), long (64 bits stored).
What is a reference type and how do they work? - A data type that stores a reference to its data instead of storing the data’s value. - This means different variables can reference a single piece of data. - Therefore changing one variable may affect another. E.g. Strings and arrays.
What is a string? - A data type which holds a series of characters. - Only limit is the available memory. - Can hold any alphanumeric characters including text, numbers and symbols. - Different from primitive data types and cannot be used with the other operators - .equals() - used to check whether a string is equal to another.
What is an array? - A data structure that can hold multiple values of a certain type. - Arrays can also contain reference variables like objects... *************
What is a 2D array? ****************
What is an abstract class? - A class that cannot be instantiated, only inherited from. - The only type of class which can contain abstract methods - Any class that inherits the abstract class will have to override the abstract method. - We have common functionality between class and so want a base class for them to inherit from but don't want that base class to be instantiated.
What is an abstract method? - A method that has a declaration but has no statements.
What is a base class? - A base/parent class is a class from which other classes are derived from. - Code can be inherited from a base class and reused by the sub class. - Inheritance allows for the reuse of code from a base class and allows for independent changes to be made.
What is a subclass? An sub/inherited/derived/child class is a class that is based on/inherits from another class.
What is a static variable? - A variable that, when declared, has an instance of it created in memory so it can act globally. It has a memory location allocated for the entire lifetime of the run of the program. - Can be allocated and used without declaring an instance of the class. Static methods use the same principle.
What is an attribute? - An attribute is a special tag in a C# class - Stores metadata about objects, methods or properties. - Usually a property of a property - Marked by being enclosed by [] - There are many predefined attributes available but it also possible to make custom attributes - E.g. before a class [Obsolete].
What is an interface? - Contains only the signatures of methods, properties, events or indexers. - A class or struct that implements the interface must implement the members of the interface that are specified in the interface definition.
Show full summary Hide full summary

Similar

Bowlby's Theory of Attachment
Jessica Phillips
Carbohydrates
Julia Romanów
KEY CONCEPTS & CHOICE OF METHOD SCLY2
ashiana121
Asch Study and Variations
littlestephie
Milgram (1963) Behavioural study of Obediance
yesiamanowl
AS Philosophy Exam Questions
Summer Pearce
Gilded Age
jbryant97
DOCUMENTS
ashiana121
Evaluation of Conformity
littlestephie