1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
forsale [732]
3 years ago
11

A student has created a Book class. The class contains variables to represent the following.An int variable called pages to repr

esent the number of pagesA boolean variable called isHardcover to indicate whether or not the book is hardcoverThe object story will be declared as type Book.Which of the following descriptions is accurate?a- An instance of the story class is Book.b- An instance of the Book object is story.c- An attribute of the story object is isHardcover.d- An attribute of the pages object is Book.e- An attribute of the Book instance is story.
Computers and Technology
1 answer:
Oksanka [162]3 years ago
3 0

Answer:

Option c An attribute of the story object is isHardcover

Explanation:

Given a book class that contains a boolean variable<em> isHardcover</em>. This is considered as an instance variable that will be available to all book object. Since the object story is declared as type Book and therefore it possesses the instance variable, isHardcover. The instance variable in an object is also termed as attribute which is a data component of the object.  

You might be interested in
Project 12-2: Bird Counter
andrey2020 [161]

The program based on the information given is illustrated below.

<h3>How to illustrate the program?</h3>

It should be noted that a computer program is a set of instructions in a programming language for the computer to execute.

Based on the information, the program is illustrated thus:

Code:

import pickle

#function to read birds data

def readBirdsData():

try:

birdsFile = open("birdsData","rb")

birdWatcher = pickle.load(birdsFile)

birdsFile.close()

birdWatcher ={}

except EOFError:

birdWatcher ={}

return birdWatcher

#function to write the data into file using pickle

def writeBirdsData(birdWatcher):

if birdWatcher == {} :

return

sorted(birdWatcher)

birdsFile = open("birdsData","ab")

pickle.dump(birdWatcher,birdsFile)

birdsFile.close()

#function to display birds data in sorted order

def displayBirdsData(birdWatcher):

print("Name\t\tCount")

print("========\t===========")

for key in sorted(birdWatcher.keys()):

print("{}\t\t{}".format(key,birdWatcher[key]))

#main function

def main():

birdWatcher = readBirdsData()

print("Bird Counter Program")

print ("\nEnter 'x' to exit\n")

name = input("Enter name of bird: ")

while True:

#break the loop if x is entered

if name == 'x':

#if the name exists in dictionary then increase the value

if the name in birdWatcher.keys():

birdWatcher[name] = birdWatcher[name] + 1

else:

#dd it otherwise

birdWatcher[name] = 1

name = input("Enter name of bird: ")

displayBirdsData(birdWatcher)

writeBirdsData(birdWatcher)

#driver code

if __nam__ == '__main__':

main()

Learn more about programs on:

brainly.com/question/26642771

#SPJ1

5 0
2 years ago
Adam has decided to add a table in a Word doc to organize the information better. Where will he find this option? Insert tab, Il
RUDIKE [14]
He will have to navigate to the Insert Tab and then Click on Table option.
6 0
3 years ago
Read 2 more answers
Ucf the ability to connect data in different tables in a database through a common field is sometimes referred to as a ____.
kari74 [83]
Much like humans, databases have relationships too.
4 0
3 years ago
Write a program using integers user_num and x as input, and output user_num divided by x three times. Ex: If the input is: 2000
TiliK225 [7]

Answer:

user_num = 2000

x = 2

for i in range(3):

 user_num = user_num // x

 print(user_num)

3 0
3 years ago
What do the stapedius and gluteus maximus have in common?<br> this is a science question
jenyasd209 [6]

Answer:

What do the stapedius and gluteus maximus have in common? They move the hips and thighs. They are attached to bones. They are the largest muscles.

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • PriQueue inherits from Queue. In the implementation of the getMax() method in the PriQueue class, we need to read and write the
    5·1 answer
  • How do you send a private message on facebook to someone who is not your friend?
    9·1 answer
  • What does the metric column in a routing table do?
    8·1 answer
  • When you are using inprivate browsing, the "inprivate is turned on" page displays in the browser window, the inprivate label is
    14·1 answer
  • The What is the pathname that starts from the working directory. directory?
    7·1 answer
  • The intensity of force acting on a rock body is expressed as
    14·1 answer
  • On most desktop computers, most of the USB ports are on the back of the computer case. Generally, you'll want to connect your mo
    13·1 answer
  • Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and en
    7·1 answer
  • Which item is used for formatting in responsive web design?
    14·2 answers
  • Malware is any malicious software installed on a computer or network without the owner’s knowledge.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!