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
the term that is used to describe how many bits are used in each pixel to show the number of colours used
Korolek [52]
Colour depth?????????????????????                              .
8 0
3 years ago
Did you know a security hacker is someone who explores methods for breaching defenses and exploiting weaknesses in a computer sy
nexus9112 [7]

Answer:

No i did not know that.

Explanation:

3 0
2 years ago
Read 2 more answers
in Java programming Design a program that will ask the user to enter the number of regular working hours, the regular hourly pay
iren2701 [21]

Answer:

In Java:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 int regularhour,overtimehour;

 float regularpay,overtimepay;

 Scanner input = new Scanner(System.in);

 

 System.out.print("Regular Hour: ");

 regularhour = input.nextInt();

 

 System.out.print("Overtime Hour: ");

 overtimehour = input.nextInt();

 

 System.out.print("Regular Pay: ");

 regularpay = input.nextFloat();

 

 System.out.print("Overtime Pay: ");

 overtimepay = input.nextFloat();

 

 float regulargross = regularhour * regularpay;

 float overtimegross = overtimehour * overtimepay;

 float totalgross = regulargross + overtimegross;

 

 System.out.println("Regular Gross Pay: "+regulargross);

 System.out.println("Overtime Gross Pay: "+overtimegross);

 System.out.println("Total Gross Pay: "+totalgross);

 

}

}

Explanation:

This line declares regularhour and overtimehour as integer

 int regularhour,overtimehour;

This line declares regularpay and overtimepay as float

 float regularpay,overtimepay;

 Scanner input = new Scanner(System.in);

 

This prompts the user for regular hour

 System.out.print("Regular Hour: ");

This gets the regular hour

 regularhour = input.nextInt();

 

This prompts the user for overtime hour

 System.out.print("Overtime Hour: ");

This gets the overtime hour

 overtimehour = input.nextInt();

 

This prompts the user for regular pay

 System.out.print("Regular Pay: ");

This gets the regular pay

 regularpay = input.nextFloat();

 

This prompts the user for overtime pay

 System.out.print("Overtime Pay: ");

This gets the overtime pay

 overtimepay = input.nextFloat();

 

This calculates the regular gross pay

 float regulargross = regularhour * regularpay;

This calculates the overtime gross pay

 float overtimegross = overtimehour * overtimepay;

This calculates the total gross pay

 float totalgross = regulargross + overtimegross;

 

This prints the regular gross pay

 System.out.println("Regular Gross Pay: "+regulargross);

This prints the overtime gross pay

 System.out.println("Overtime Gross Pay: "+overtimegross);

This prints the total gross pay

 System.out.println("Total Gross Pay: "+totalgross);

8 0
2 years ago
What social impact did the gunpowder have on society?
olga2289 [7]
It had a huge impact people could use other things than bows and arrows to fight in wars.
8 0
3 years ago
Hello everyone. I need help. C programming. Create at least two more functions except the main () function to collect them.
Andrew [12]

Answer:

Explanation:

#include <iostream>

using namespace std;

int costdays(int);

int costhrs(int,int);

int main()

{

   int dd,hh,mm,tmph,tmpd,tmpm=0;

   int pcost,mcost=0;

   cout<<"Enter Parking time" << endl;

   cout<<"Hours: ";

   cin>>hh;

   cout<<"Minutes: ";

   cin>>mm;

   

   if (mm>60)

   {

       tmph=mm/60;

       hh+=tmph;

       mm-=(tmph*60);

   }

   if (hh>24)

   {

       tmpd=hh/24;

       dd+=tmpd;

       hh-=(tmpd*24);

   }

   if ((hh>4)&&(mm>0))

   {

       pcost+=costdays(1);

   }

   else

   {

       mcost=costhrs(hh,mm);

   }

   cout<<"Total time: ";

   if (dd>0)

   {

       cout<<dd<<"days ";

       pcost+=costdays(dd);

   }

   pcost+=mcost;

   cout<<hh<<"h "<<mm<<"mins"<<endl;

   cout<<"Total Cost :"<<pcost<<"Won";

   return 0;

}

int costdays(int dd)

{

   return(dd*25000);

}

int costhrs(int hh,int mm)

{

   int tmpm, tmp=0;

   tmp=(hh*6)*1000;

   tmp+=(mm/10)*1000;

   tmpm=mm-((mm/10)*10);

   if (tmpm>0)

   {

       tmp+=1000;

   }

   return(tmp);

}

3 0
3 years ago
Other questions:
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    9·2 answers
  • why do programs include keyboard shortcuts for certain actions? do you prefer the mouse or the keyboard/ why?
    7·1 answer
  • which of the following is involved in ordering an outline. A.grouping B.merging C.organizing D.arranging
    10·1 answer
  • Motorcycles have two or three wheels, a seat for the rider and at least a ____ horse-powered engine.
    15·1 answer
  • 2.2-2 Consider sorting numbers stored in array by first finding the smallest element n A of and exchanging it with the element i
    11·1 answer
  • An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________
    8·1 answer
  • 2. Used to drive in or remove screws that fasten electrical wires or other electrical accessories. A. Pliers C. Screwdrivers B.
    15·1 answer
  • Write function d2x() that takes as input a nonnegative integer n (in the standard decimal representation) and an integer x betwe
    14·1 answer
  • I really need help in this!!!
    11·1 answer
  • When can screentips be useful? when finding a tab when looking for a command when pinning the ribbon when using a command.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!