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
Leya [2.2K]
3 years ago
14

Would this program compile run? If not, why; if yes: what would be the output? public class ConstChaini { public static void mai

n(String [] args){ new SubClass(); System.out.println(); new SubClass(1); } class SuperClass{ public SuperClass(){ System.out.print(-4-); } public SuperClass(int i){ System.out.print("8"); } } class SubClass extends SuperClass( public SubClass()( this(1e); System.out.print(C"); } public SubClass(int i){ super(i); System.out.print("D"); }
Computers and Technology
1 answer:
nikdorinn [45]3 years ago
8 0

Answer:

Check the explanation

Explanation:

// Code to copy

public class ConstChain1 {

public static void main(String[] args)

{

new SubClass();

System.out.println();

new SubClass(1);

}

}

class SuperClass{

public SuperClass() {

System.out.println("D");

}

public SuperClass(int i) {

System.out.println("C");

}

}

class SubClass extends SuperClass{

public SubClass() {

this(10);

System.out.println("B");

}

public SubClass(int i) {

super(i);

System.out.println("A");

}

}

Explanation:

Now each time when a object of a subclass is been created it's super class constructor will be executed first then only subclass object is created by executing it's constructor.

You might be interested in
Consider a network of 8 routers connected together to provide more than one path of connectivity between host A and host B at tw
ser-zykov [4K]

Answer:

Option C is the correct option to the following question

Explanation:

Because there are not any limits is required of sending data and packets between host A and host B by the routers and the router permit more than one paths between the hosts for the establishment of the connectivity st two distinct locations in the routing protocol. The router transmits the packets between the hosts that is produced by link-state protocol.

5 0
3 years ago
The camera on a phone or laptop can be used to track a user's eye movements. Which of these is NOT one of the possible applicati
AnnyKZ [126]

Answer:

The question is incomplete. The full question is the following one:

"The camera on a phone or laptop can be used to track a user's eye movements. Which of these is NOT one of the possible applications of this technology (as listed in the course reading):

All of these ARE:

Measuring the user's intelligence,

Gathering marketing information for advertisers,

Detecting cognitive disorders."

The correct answer is: "Measuring the user's intelligence".

Explanation:

This technology is also known as eye tracking technology and has to do with a sensor that tracks eye movement and interaction with machines, such as mobiles and computers. The only option which does not apply to this technology and its features is the first one, "Measuring the user's intelligence", because "intelligence" is very subjective and abstract, it is not something a sensor can measure, although eye tracking technology can measure the amount of production concerning certain topics, the level of interest, attention, and interaction, and some cognitive disorders people behave, such as Attention Deficit Hyperactivity Disorder (ADHD). Besides that, companies, agencies, and institutional systems may track and gather people's eye movements in order to share them with other companies, agencies, and institutions for improving marketing, production, and interests.

(ps: mark as brainliest, please?!)

8 0
3 years ago
Complete the statement below with the correct term.
Lilit [14]

Answer:

<em>Every </em><em>couple</em><em> </em><em>of </em><em>month </em><em>or </em><em>whatever </em><em>you </em><em>give </em><em>it </em><em>to </em><em>someone</em><em> </em><em>else</em>

8 0
2 years ago
Which best describes how information is sent on the internet?
V125BC [204]

Answer:

a. The information is first sent via a Broadband for efficient transmission, and if not successful, only then it is resent via a Baseband that exists as a backup network as packets b. The message is first broken down into small packets before being sent, then they are

Explanation:

8 0
2 years ago
"write a program to play and score the paper-rock-scissor game. each of two users types in either p, r, or s. the program then a
algol13

The program is an illustration of conditional statements.

Conditional statements are used to execute instructions, if and only if certain <em>condition or conditions </em>are met.

Take for instance: <em>If b = 5, print "ab"</em>

The above print statement will only be executed, if the <em>value of b is 5</em>

The paper-rock-scissor program in Python where comments are used to explain each line is as follows,  

#This imports the random module

import random

#This is used to control the repetition of the game

playagain ="T"

#The following is repeated until the user chooses not to play again

while(playagain == "T"):

   #This generates a random choice for the computer

   computer = random.choice(['Rock', 'Paper', 'Scissors'])

   #This gets input for the player

   player = input('Choose: ')

   #If the player and computer choose the selection

   if player == computer:

       #Then, it's a tie

       print('A tie - Both players chose '+player)

   #If the player wins

   elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):

       #This prints "player won" and the reason

       print('Player won! '+player +' beats '+computer)

   #If otherwise,

   else:

       #This prints "computer won" and the reason

       print('Computer won! '+computer+' beats '+player)

   #This asks if the player wants to play again

   playagain = input("Play again? T/F: ")

At the end of each round,

  • The program displays the winner
  • Or prints a tie, if there's a tie

See attachment for sample run

Read more about conditional statements at:

brainly.com/question/22078945

8 0
2 years ago
Other questions:
  • Yahoo! allows users to create personalized my yahoo! pages. users can add or delete a variety of information from their personal
    8·2 answers
  • A good reference point for determining the position of a line or curb in front of you is your __________ . A. Hood ornament B. L
    10·1 answer
  • A _________ consists of a set of computers that interconnect by means of a relatively unsecure network and makes use of encrypti
    5·1 answer
  • What are the first and the last physical memory addressesaccessible using
    10·1 answer
  • Which of the following are valid values for a boolean value in programming? (Select all that apply)
    8·1 answer
  • Choose all of the items that represent functions of the operating system kernel.
    15·2 answers
  • When projecting a presentation on a large screen, what should your minimum font size be?
    6·2 answers
  • How do cyber criminals target user’s end devices?
    11·2 answers
  • 23. ____________ is a slide that is used as the base design theme for other slides.​
    11·1 answer
  • Do OBS mic filters apply everywhere? Such as discord and other apps similar. Or is it just on streaming?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!