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
ZanzabumX [31]
3 years ago
6

Composition means ________. a)that data fields should be declared private b)that a class extends another class c)that a variable

of supertype refers to a subtype object d)that a class contains a data field e)that references another object
Computers and Technology
1 answer:
zlopas [31]3 years ago
3 0

Answer:

The answer is "Option d".

Explanation:

In programming, Composition is a method, which is used to applying multiplicating and additive probability laws to evaluate the probabilities, It is a unique method, that uses math function, it also use to include data field, and other choices are wrong, that can be described as follows:

  • In option a, It uses an access modifier, that's why it is wrong.
  • In option b, This process is called inheritance, that's why it is wrong.
  • In option c, It uses in part of typecasting, that's why it is wrong.
  • In option e, It is incorrect because it refers to another object.

You might be interested in
Free points! your welcome
Dvinal [7]

Answer:

Thanks!!!!

Explanation:

5 0
4 years ago
Read 2 more answers
A. True
kupik [55]
If the coder is unable to locate a code that describes the exact service provided, it is acceptable to use a code approximates the services provided. TRUE, the coder should be able to come up with a code for that is what they provide.
7 0
3 years ago
Write the definitions of two classes Day and Night. Both classes have no constructors, methods or instance variables. Note: For
Colt1911 [192]

Answer:

class Day

{

}  

class Night

{

}

Explanation:

Given

Two classes named: Day and Night

Requirement: Both classes have no constructors, methods or instance variables. should not be declared using the public visibility modifier.

The syntax to define a class in object oriented programming is

modifier class classname {

 // Constructor

 constructor(variablename) { ......}

 // Methods

 methods() { ... }

 ...

}

Access modifiers (or access specifiers) are keywords in object-oriented languages that set the accessibility of classes, methods, and other members. Examples are private, public, protected, etc.

Going by the syntax above to define class Day

Day

private class Day{

 // Constructor

 constructor(duration)

{

this.duration = duration;

}

 // Methods

CalculateDate() { ... }

}

But the question states that both classes have no constructors, methods or instance variables. should not be declared using the public visibility modifier.

So, class Day will be defined as follows

class Day

{

}

It could also be declared using visibility modifiers other than public modifier.  So, class Day will be defined as follows

private class Day

{

}

and

protected class Day

{

}

Similarly, class Night can be defined as follows

class Night

{

}

private class Night

{

}

and

protected class Night

{

}

4 0
3 years ago
Write a function where you are given: a list of numbers "nums", a number to search for "num". Return the index of "num" in the l
ASHA 777 [7]

The program is an illustration of functions; functions are used to represent collection of named statements

<h3>The program in Python</h3>

The function in Python where comments are used to explain each line is as follows:

#This defines the function

def checkList(nums,num):

   #This checks if num exists in nums

   if num in nums:

       #If yes, this returns the index of num

       return nums.index(num)

   #If otherwise, this returns -1

   return -1

Read more about Python programs at:

brainly.com/question/26497128

#SPJ1

6 0
3 years ago
How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? what system transl
nordsb [41]
Awesome question! I love networking. When you enter a URL into your browser, your computer sends the request to your ISP or internet service provider. Your ISP has a HUGE database that coordinates the IP address to the domain name. This database is called a DNS, or Domain Name Service. So when you submit www.google.com to your ISP, they return look in the DNS and find the IP address. The ISP then returns the IP address to you. Your browser then takes the IP and connects you to the server. The server finally send the index.html file to and your browser and renders it as a web page. 

This all happens in the blink of an eye. The internet is truly amazing :D
6 0
3 years ago
Other questions:
  • If you want a user to enter exactly 20 values which loop would be the best to use
    12·1 answer
  • Why is Bot_Seth Trash at video games?
    13·2 answers
  • Question 14 (3 points)
    5·1 answer
  • Which of the following statements isNOT true about abstract data types (ADTs)?A list is anexample of an ADT.ADTs hide theimpleme
    7·1 answer
  • Write two methods: encrypt and decrypt. encrypt should #take as input a string, and return an encrypted version #of it according
    6·1 answer
  • Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than
    9·1 answer
  • .true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
    12·1 answer
  • Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
    15·1 answer
  • Explain with examples what is software​
    6·1 answer
  • What is the difference between a free-form outline and a modified outline?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!