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
Alex Ar [27]
3 years ago
13

What is composition

Computers and Technology
1 answer:
Dmitry [639]3 years ago
4 0
The term composition in simple words is “putting together”. It is a thing composed of various elements.
You might be interested in
Write a class called OrthokonBoard that represents the board for a two-player game that is played on a 4x4 grid.
Elden [556K]

Answer:

Explanation:

The following code is written in Java. It creates the class OrthokonBoard which holds a 4x4 grid board in which each space is an "x" . Once the user creates an OrthokonBoard object they need to pass the positions of player 1 and 2 as an integer array of an x and y coordinate on the grid. Then the constructor of the object places the players on the board. A test version of the class was added to the main method and the output can be seen in the attached picture below.

class Brainly {

   public static void main(String[] args) {

       int[] player1Pos = {1, 1};

       int[] player2Pos = {3,3};

       OrthokonBoard newBoard = new OrthokonBoard(player1Pos, player2Pos);

       for (char[] x : newBoard.board) {

           System.out.println("");

           for ( char y : x) {

               System.out.print(y + " ");

           }

       }

   }

}

class OrthokonBoard {

   char[][] board = {{'x', 'x', 'x', 'x'}, {'x', 'x', 'x', 'x'}, {'x', 'x', 'x', 'x'}, {'x', 'x', 'x', 'x'}};

   public OrthokonBoard(int[] playerOnePos, int[] playerTwoPos) {

       board[playerOnePos[0]][playerOnePos[1]] = '1';

       board[playerTwoPos[0]][playerTwoPos[1]] = '2';

   }

}

6 0
3 years ago
Write a function called getChar that has no function inputs, but takes in two character inputs from the user (in1 and in2) and o
bearhunter [10]

Answer:

def getChar():

   while True:

       in1 = input('Enter first char: ')

       try:

           if len(in1) != 1:

               raise

           else:

               in2 = input('Enter second char: ')

               if len(in2) != 1:

                   raise

               else:

                   break

       except:

           print('Enter just one character')

   return in1, in2

def chars2string(in1,in2):

   print(in1*5 + in2*5)

def main():

   ls = getChar()

   in1 = ls[0]

   in2 = ls[1]

   chars2string(in1, in2)

if __name__ == '__main__':

   main()

Explanation:

The programming language used is python 3.

The script first defines a function getChar and makes use of a while loop in combination with try and except blocks and IF statements, the code ensures that both inputs that are entered by the user after the prompt are 1 in length. i.e. Just one character. This function returns the two characters that were entered.

The second function that is defined is chars2string this function takes two arguments, It repeats each argument five times and returns a joined string.

Finally, the main function is defined and it calls the getChar function  first, the values that are returned by this function is assigned to two variables, that is then passed on to the chars2string function. The main function is called and the Joined string is printed to the screen.

3 0
3 years ago
By applying styles, _______ formats are being applied each time. A. various B. different C. the same D. similar
Dmitry [639]
I just took the test on (PF) it's C. the same

i hope this helped someone.
;-)
4 0
4 years ago
Read 2 more answers
4. When the keyword ____________________ is followed by a parenthesis, it indicates a call to the superclass constructor.
Andreyy89

Answer:

Super

Explanation:

In object-oriented programming (OOP) language, an object class represents the superclass of every other classes when using a programming language such as Java. The superclass is more or less like a general class in an inheritance hierarchy. Thus, a subclass can inherit the variables or methods of the superclass.

Basically, all instance variables that have been used or declared in any superclass would be present in its subclass object.

Hence, when the keyword super is followed by a parenthesis, it indicates a call to the superclass constructor and it should be the first statement declared in the subclass constructor.

5 0
3 years ago
PLS HELP ASAP ILL GIVE BRAINLKEST PLS THANKS 20 POINTS
OLga [1]

Answer:

#1?

Explanation:

Might be wrong..

5 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following values is an example of a floating point number?
    12·1 answer
  • The first step in transforming an extended e-r model into a relational database design is to
    14·1 answer
  • How do you compare text on different pages of a document?
    14·1 answer
  • Several surprising findings were revealed in the wake of the Target breach, providing a cautionary tale for all executives and s
    6·1 answer
  • Use the drop-down menus to complete statements about back-up data files.
    12·2 answers
  • List 2 end to end test commands. <br><br> Will mark Brainliest!!
    13·1 answer
  • Which is the least technically experienced technical support group?
    7·1 answer
  • Select all that apply.<br> What two things can you do to display the entire contents of a cell?
    12·1 answer
  • It can be hard to get close enough to photograph animals in the wild true or false
    14·2 answers
  • Question #2
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!