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
What is microsoft access?
atroni [7]
Microsoft Access is a database management system that is part of the Microsoft Office Suite.
8 0
3 years ago
A switch is a central network device that connects network nodes such as workstations and servers in a physical ____ topology
Black_prince [1.1K]
<span>A switch is a central network device that connects network nodes such as workstations and servers in a physical Star topology</span>
8 0
3 years ago
A Python function cannot under normal circumstances reference a module variable for its value.
marishachu [46]
This is false because
6 0
3 years ago
Read 2 more answers
I’m joining the robotics team in my school, but my knowledge is pretty basic. What should I do to improve myself?
Aleonysh [2.5K]
Start learning the functions of a computer and really put ur heart into it
8 0
3 years ago
Write code to take a String input from the user, then print the first and last letters of the string on one line. Sample run: En
Ainat [17]
<h2>Answer:</h2>

//import the Scanner class to allow for user input

import java.util.Scanner;

//Begin class definition

public class FirstAndLast{

   //Begin the main method

    public static void main(String []args){

       

       

       //****create an object of the Scanner class.

       //Call the object 'input' to receive user's input

       //from the console.

       Scanner input = new Scanner(System.in);

       

       //****create a prompt to tell the user what to do.

       System.out.println("Enter the string");

       

       //****receive the user's input

       //And store it in a String variable called 'str'

       String str =  input.next();

       

       //****get and print the first character.

       //substring(0, 1) - means get all the characters starting

       //from the lower bound (index 0) up to, but not including the upper

       //bound(index 1).

       //That technically means the first character.

       System.out.print(str.substring(0,1));

       

       //****get and print the last character

       //1. str.length() will return the number of character in the string 'str'.

       //This is also the length of the string

       //2. substring(str.length() - 1) - means get all the characters starting

       // from index that is one less than the length of the string to the last

       // index (since an upper bound is not specified).

       // This technically means the last character.

       System.out.print(str.substring(str.length()-1));

       

       

       

    }  // end of main method

   

} //end of class definition

<h2>Explanation:</h2>

The code has been written in Java and it contains comments explaining important parts of the code. Kindly go through the comments.

The source code and a sample output have also been attached to this response.

To run this program, copy the code in the source code inside a Java IDE or editor and save it as FirstAndLast.java

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
4c53f66d970acf88b251b2cf41bcdaf6.png
3 0
2 years ago
Other questions:
  • Can someone fix this so that it only says "its a payday" on 15 and 30 and on all other days "sorry, it's not payday"
    9·1 answer
  • AYUDAAA..... DARÉ TODOS LOS PUNTOS QUE PUEDA.
    15·1 answer
  • What is the full path of the directory on this computer containing the SAM registry hive file
    15·1 answer
  • ____ is an iterative software development process that focuses on team productivity and delivers software best practices to all
    13·1 answer
  • What is not true about contracts?
    12·2 answers
  • What are personal skills?
    5·1 answer
  • Write a program that reads a file that contains only integers, but some of the integers have embedded commas, as in 145,020. The
    10·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
  • If u play codm pls tell me ur username
    9·2 answers
  • What plugs into this?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!