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
EleoNora [17]
3 years ago
9

In order to use an object in a program, its class must be defined.

Computers and Technology
1 answer:
Anit [1.1K]3 years ago
3 0

Answer:

True

Setting the initial values of an attribute

Explanation:

A class in a program describes the contents of the objects that it belongs to and specifies how they behave. It defines the operations (methods).

Therefore, for an object to be used in a program, its class must be defined, which is TRUE.

Initialization with regards to object-oriented programming is defining or assigning values to a constant or variable. Thus, option D is correct as it is setting the initial values of an attribute

You might be interested in
Credit card numbers follow a standard system. For example, Visa, MasterCard, and Discpver Card all have 16 digits, and the first
fgiga [73]

Answer:

try:

   cardNumber = str(input('Enter your card number her: \n'))

   if (len(cardNumber) > 16 or len(cardNumber < 16)):

       raise

except:

   print ('You have entered an invalid cardNumber.')

else:

   if cardNumber.startswith("2"):

       print('American Express Card')

   elif cardNumber.startswith("4"):

       print('Visa Card')    

   elif cardNumber.startswith("5"):

       print('Master Card')    

   else:

       print('Unknown Card')

Explanation:

In the try block section:

The first line prompt the user for input, which is converted to string and assigned to cardNumber variable. The next line test the length of the cardNumber entered, if it is less than 16 or greater than 16; an exception is raise.

In the except section:

An error message is displayed telling the user that he/she has entered an invalid card number.

In the else section:

This is where is program check for type of card using an if...elif...else statement block. If the cardNumber start with 2; an output of "American Express card" is displayed. If the cardNumber start with 4; an output of "Visa card" is displayed. If the cardNumber start with 5; an output of "Master card" is display else "Unknown card" is displayed to the user.

5 0
3 years ago
Any fact or set of facts, such as the words in a letter to a friend or the notes in a song, can become computer ____.
Alina [70]

I think the answer is... data

3 0
3 years ago
Describe some common types of charts.​
Mekhanik [1.2K]
Bar chart.
Pie chart.
Line chart.
4 0
2 years ago
Read 2 more answers
Why people get addited to mobile and by playing games​
nadya68 [22]
Because it is a very fun game and if it is fun people like it
4 0
3 years ago
What does considering scale mean in science?
Annette [7]

Answer: scale (chemistry), the range of mass or volume of a chemical reaction or process.

Explanation:

:D h

5 0
2 years ago
Other questions:
  • A viral video is one that can infect your computer with malware. <br> a. True <br> b. False
    6·1 answer
  • The most common solution to supply chain uncertainties is to build inventories or __________ as insurance.
    6·1 answer
  • You are asked to optimize a cache design for the given references. Th ere are three direct-mapped cache designs possible, all wi
    7·1 answer
  • 50 POINTS!!!!
    8·1 answer
  • Generate an array x that has n=100 random numbers that are uniformly distributed over the interval [0,1) . Look up how to use th
    8·1 answer
  • How to change screen resolution in windows 10?
    5·1 answer
  • Who is a second-degree contact on a professional networking profile?
    12·1 answer
  • What can happen if you do not follow the directions of medicine or the directions from the doctor? (Give 4 examples)​
    15·1 answer
  • 5. Compare the telephone network and the internet. What are the similarities? What are the differences?
    12·1 answer
  • 1. Which of the following cables are used in networking? Check all that apply.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!