Scripting Foundations Chapter 9
Which language is NOT considered object-oriented?
C
Which language(s) is/are compiled rather than interpreted?
C, C++, and Java
Which languages are statically typed rather than dynamically typed?
C, C++, and Java
A programming language that is first converted to machine code, which can then only run on a particular machine type.
Compiled
C, C++, and Java are what kind of language?
Compiled
Which kind of language is first converted to an executable, then run?
Compiled
Which kind of language usually has faster execution?
Compiled
Object-oriented language
Creating a program as a collection of objects can lead to a more understandable, manageable, and properly-executing program. supports decomposing a program into objects. C++, Java, Python, and C# provide extensive support.
A programming language that requires no compilation, and instead can be directly run by another program.
Interpreted
Python, Javascript, and MATLAB are each what kind of language?
Interpreted
Which kind of language can be run right away, without converting to an executable first?
Interpreted
Which kind of language is more portable to different machines?
Interpreted
A language that puts tags around text to indicate formatting and other features.
Markup
What kind of language is HTML, the language of web pages?
Markup
statically typed
Most compiled languages are typed this way. Each variable's type must be declared and cannot change while the program runs. Often considered safer due to reporting errors during compilation (like if assigning an integer with a string),
Dynamically Typed
Most interpreted languages are typed this way. A variable's type may change while a program executes, usually based on what is assigned to the variable. Considered easier to use when types need to change, requiring less converting or fewer variables.
A language that supports decomposing a large program into a set of items.
Object-Oriented
What is typically found in a library?
Pre-written functions
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. integer origPurchasePrice
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise.
A language whose variable types do not change during execution.
Statically-typed
In a dynamically-typed language, a variable x is declared as an integer type. Later, x is assigned with 3.14, after which x's type is _____.
A float
Interpreted language/scripting language
A language that is run one statement at a time by another program called an interpreter. Ex. Python, Javascript, C#.
Compiler
A tool used to convert a language into machine code
In a statically-typed language, a variable x is declared as an integer type. Later, x is assigned with 3.14, after which x's type is _____.
An integer
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. integer daysOnLot
True
A language whose variable types may change during execution.
Dynamically-typed
A large program will be written for data analysis. Given a file of data, a user can apply different operations, like compute mean, compute median, compute max, etc. An object-oriented language is likely preferred.
False
A programmer can only use one library in a program.
False
A typical library consists of one function.
False
A web browser executes an HTML program one statement at a time.
False
An HTML file is typically compiled into an executable file, which can then be run.
False
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. DetermineTopSalesperson()
False
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. float todaysTemperature
False
To use a library, a programmer must include the library, and then write the functions for the library.
False
A key advantage of using a library is improved programmer productivity.
True
A large program will be written for a school system. A school has people, who have names, ages, etc. Some people have report cards, which has courses, grades, teachers, etc. A course has students, a teacher, a room, etc. An object-oriented language is likely preferred.
True
An HTML file is not a program. No statements exist. Rather, text is surrounded by tags to indicate how to render the text.
True
Putting <h1> and </h1> around text causes a web browser to render that text using large bold font.
True
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. DecreaseStickerPrice()
True
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. IncrementCarDaysOnLot()
True
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. integer carStickerPrice
True
In a statically-typed language, if a programmer assigns integer variable numPeople with "Hello there", an error ___ usually be reported.
Will
In a dynamically-typed language, if a programmer assigns integer variable userInput with "Hello there", an error ___ usually be reported.
Will not
Library
a set of pre-written functions (and other items) that carry out common tasks, that a programmer can use to improve productivity.
markup language
allows a developer to describe a document's content, desired formatting, or other features.
Object
consists of some internal data items plus operations that can be performed on that data
Some of the variables and functions for a used-car inventory program are to be grouped into an object type named CarOnLot. Select True if the item should become part of the CarOnLot object type, and False otherwise. integer numSalespeople
false
Compiled language (examples)
first converted by a compiler into machine code, which can run on a particular machine. Examples include C, C++, Java, and C#.
