100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

IT 209 Quizzes Short Mult Choice Questions with Correct Answers

Beoordeling
-
Verkocht
1
Pagina's
5
Cijfer
A+
Geüpload op
24-06-2024
Geschreven in
2023/2024

Which of the following statements is true about class attributes? -the values of an object's attributes are called the state of that object -attributes can be any kind of Python data types -object attributes can be read or updated by using "dot notation" - for example, for an object s1, = 'Mary' resets object s1's name to 'Mary'. -attributes belonging to an object are referenced by methods inside the class by using a common keyword prefix, customarily "self" Which of the following are true about classes in Python? -A class definition is only a blueprint and is not executed by the Python interpreter until used by other code -A class consists of attributes (data) and methods (functions or behaviors -When objects of a class are created the "__init__( )" method accepts parameters that are used to assign starting values for some of its attributes. Which of the following are true about class methods? -methods are defined using the same keyword used to define functions, e.g. "def" -methods are often referred to as the class behaviors -methods may use any valid Python statements -a method called "getDay" can be defined by the statement "def getDay (self):" -a class must always have a method called "__init__( )" if it is to be used to create objects of the class's type -a method uses attributes that belong to the object in which it's defined by using a common prefix such as "self" - for example, "" to read or update object attribute "day" Which statements are true about attributes? -instance attributes belong to a particular class object and each object has its own copy or value -class attributes are accessed by using class name-dot-attribute, e.g. "DntYear" for class attribute "currentYear" -class attributes have only one copy or value for all objects of that class Which of the following statements is true concerning the security or privacy aspects of the Java and Python languages? Java's security is stronger, more secure, than Python's How might you change the Date class, as described in the various lectures, to modify it so its objects could be useful when added into an appointment book class container? Check all that would improve the usability of the Date class for this requirement. -Add an attribute to represent an appointment time -Add an attribute to record the name of the party with whom an appointment is with

Meer zien Lees minder
Instelling
IT 209 GMU
Vak
IT 209 GMU









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
IT 209 GMU
Vak
IT 209 GMU

Documentinformatie

Geüpload op
24 juni 2024
Aantal pagina's
5
Geschreven in
2023/2024
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

IT 209 Quizzes Short Mult Choice
Questions with Correct Answers
Which of the following statements is true about class attributes? ✅-the values of an
object's attributes are called the state of that object
-attributes can be any kind of Python data types
-object attributes can be read or updated by using "dot notation" - for example, for an
object s1, s1.name = 'Mary' resets object s1's name to 'Mary'.
-attributes belonging to an object are referenced by methods inside the class by using a
common keyword prefix, customarily "self"

Which of the following are true about classes in Python? ✅-A class definition is only a
blueprint and is not executed by the Python interpreter until used by other code
-A class consists of attributes (data) and methods (functions or behaviors
-When objects of a class are created the "__init__( )" method accepts parameters that
are used to assign starting values for some of its attributes.

Which of the following are true about class methods? ✅-methods are defined using the
same keyword used to define functions, e.g. "def"
-methods are often referred to as the class behaviors
-methods may use any valid Python statements
-a method called "getDay" can be defined by the statement "def getDay (self):"
-a class must always have a method called "__init__( )" if it is to be used to create
objects of the class's type
-a method uses attributes that belong to the object in which it's defined by using a
common prefix such as "self" - for example, "self.day" to read or update object attribute
"day"

Which statements are true about attributes? ✅-instance attributes belong to a
particular class object and each object has its own copy or value
-class attributes are accessed by using class name-dot-attribute, e.g.
"Date.currentYear" for class attribute "currentYear"
-class attributes have only one copy or value for all objects of that class

Which of the following statements is true concerning the security or privacy aspects of
the Java and Python languages? ✅Java's security is stronger, more secure, than
Python's

How might you change the Date class, as described in the various lectures, to modify it
so its objects could be useful when added into an appointment book class container?
Check all that would improve the usability of the Date class for this requirement. ✅-
Add an attribute to represent an appointment time
-Add an attribute to record the name of the party with whom an appointment is with

, -Add an attribute to record the location of the appointment
-Add a method to display all appointments for a given day or time period
-Add methods to allow appointments to be added, removed, or updated

A method whose purpose is to allow external code the ability to change a protected
attribute that's part of that method's class is what type of method? ✅setter

In Python object-oriented programming, inheritance involves: ✅creating a new class by
citing the name of another class whose attributes and methods become part of the new
class

Which of the following are true about UML? Check all that are true. ✅-UML is an
abbreviation for "Unified Modeling Language"
-UML class diagrams are normally drawn as rectangles divided into three areas
-UML class diagrams show the class name in the uppermost area of the diagram and
methods in the lowest area
-UML diagrams may contain multiple class diagrams showing relationships among
classes in a system

In creating a UML diagram for somce class you want to include a method that allows an
attribute called "factor" to be reset. You know that "factor" will be a string data type and
that the method should return True if the update is successful, and False if not. Which of
the following actions will correctly add the method information to the UML diagram? No
privacy or security settings need to be shown on this diagram. ✅enter
"setfactor(string): Boolean" in the bottom area of the diagram

A subclass that inherits a method from a superclass can do the following (check all that
apply): ✅-execute the inherited method without specifically defining its code in its own
definition
-override the inherited method, but execute the superclass's method by running "super(
). {method name}"
-override an inherited method by providing a method with the same name as the
parent's method

(True/False) Exceptions are events such as errors detected during program execution
that alter, or interrupt, the program's flow. ✅True

Below is part of a file with text data. How might one process the file using a Python
program? Check all the following that would be used in the processing.
AL, Alabama, Montgomery
CO, Colorado, Denver
DE, Delaware, Dover
GA, Georgia, Atlanta
MT, Montana, Helena
RI, Rhode Island, Providence ✅-open the file in read ("r") mode

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
twishfrancis Kaplan University
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
200
Lid sinds
2 jaar
Aantal volgers
42
Documenten
10607
Laatst verkocht
4 weken geleden
SmartStudy Hub

Discover top-quality study materials at SmartStudy Hub. From concise summaries to exam guides, I offer resources designed to boost your grades. Trust in my expertise and elevate your academic performance today! NB: I do assignments too. Struggling to meet your academic deadlines? I've got you covered! I'll ensure papers are delivered on time, each time. Don't let deadlines stress you out- let's work together to achieve your academic goals! WELCOME!!!

Lees meer Lees minder
4.0

38 beoordelingen

5
22
4
6
3
4
2
0
1
6

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen