answer.
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
Semmy [17]
2 years ago
15

An online game is played with two dice. In this context, explain what is meant by decomposition in a simple way.

Computers and Technology
1 answer:
pshichka [43]2 years ago
8 0
Their value is random, so you need to generate two numbers between 1 & 6.
    You may need to display the numbers
    The main part of the program needs to know the numbers to limit what the user may do next.


That's most of the first level of decomposition. You need to keep decomposing (breaking into smaller simpler pieces) (think of an outline) and deciding what objects, functions, data structures and logic you're going to code this.
You might be interested in
A machine is having issues, so the user is responsible for getting the machine serviced. Which stage of the hardware lifecycle d
valentina_108 [34]

Answer:

Maintenance, is the right answer.

Explanation:

A stage where the hardware of a machine is replaced due to some issues which make the machine work inappropriately is called the maintenance stage of the hardware. In this phase, some modifications are made in the hardware to support the operational effectiveness of the hardware. The customer executives try to improve the performance of the system and provide better security during replacing the hardware.

8 0
2 years ago
Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee timeshee
Vesna [10]

Answer:

int employees;   //set integer type variable

int a,b;     //set two integer type variable

int wage=0;   //initialize integer type variable

int hours=0;   //initialize integer type vcariable

total=0;    

cin >> employees;    //get input from the user

for (a=1; a<=employees; a++){     //set for loop

cin >> wage;     //get input from the user

for (b=1; b<=5; b++){    //set for loop

cin >> hours;    //get input from the user

total += hours * wage;    //perform multiplication

}

}

Explanation:

Here, we define four integer type variable "a", "b", "wage" "hour" and assign value in "wage" to 0 and "hours" to 0.

Then, we get input from the user in the variable "employees".

Then, we set the for loop and pass the condition inside it we get input from the user in the variable "wage".

Then, again we set the for loop and pass the condition inside it we get input from the user in the variable "hours".

Then, we perform addition and the multiplication.

7 0
2 years ago
A drive is small enough to be carried in one's pocket.
hjlf

Answer: Pen

Explanation:

4 0
1 year ago
Create two classes. The first, named Sale, holds data for a sales transaction. Its private data members include the day of the m
olya-2409 [2.1K]

Answer:

A C++ program was used in creating two classes. the code is stated below.

Explanation:

Solution

The C++ program is executed below:

#include<iostream>

using namespace std;

//declare class (will be define later)

class Salesperson;

//class Sale

class Sale

{

  //private members of class

  private:

      string day;

      double amtOfSale;

      int salesPersonId;

 //public methods

  public:

      //constructor that takes day,amount of sale and salesPersonId as parameters

      Sale(string date,double sale,int id)

      {

          //set the private members to the initial values passed

          day=date;

          amtOfSale=sale;

          salesPersonId=id;

      }    

      //declare a friend function that takes objects of the two classes as parameters

      friend void display(Sale,Salesperson);

};  

//define class Salesperson

class Salesperson

{

  //private members of the class

  private:

      int salesPersonId;

      string lastName;    

  //public methods

  public:

      //constructor that takes name and id as parameters

      Salesperson(int id,string name)

      {

          //set the members of the class with the parameters passed

          salesPersonId=id;

          lastName=name;

      }  

      //declare a friend function that takes objects of the two classes as parameters

      friend void display(Sale,Salesperson);

};

//define the friend funtion

void display(Sale saleObj,Salesperson personObj)

{

  //display the sales info using the objects of the two classes

  cout<<"\nSale #"<<saleObj.salesPersonId<<" on "<<saleObj.day<<" for $"<<saleObj.amtOfSale<<" sold by #"<<personObj.salesPersonId<<" "<<personObj.lastName;

}  

int main()

{

  //create object for Sale class and pass default values

  Sale sObj1("12/25/2016",559.95,103);

  //create object for Salesperson class and pass default values

  Salesperson pObj1(103,"Woods");

 

  //create another object for Sale class and pass default values

  Sale sObj2("11/15/2016",359.95,106);

  //create another object for Salesperson class and pass default values

  Salesperson pObj2(106,"Hansen");

  //using the friend function dislay the sales info

  display(sObj1,pObj1);

  display(sObj2,pObj2);

  return 0;

}

4 0
2 years ago
The overall purpose of CSS is to modify the way web pages look without modifying the underlying HTML code. way tables render in
dedylja [7]
Hi!

The purpose of CSS is to edit and change the appearance of a website without having to go and change any of the HTML code.

Hopefully, this helps! =)
5 0
2 years ago
Read 2 more answers
Other questions:
  • Computer design software requires __________________ to be used properly and successfully by architects.
    9·2 answers
  • What is a ribbon in word
    15·2 answers
  • Jack is an accountant. He can't access the spreadsheet software, which is installed on the server. What should Jack do?
    5·2 answers
  • When ____ occur during preliminary debugging, dummy print statements—statements that are temporarily inserted into the code to d
    9·1 answer
  • "Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that de
    10·1 answer
  • Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation
    6·1 answer
  • Which of the following Teacher Tips would NOT be helpful when trying to select content from the Chrome Web Store? "Can be used a
    9·1 answer
  • A program is divided into 3 blocks that are being compiled on 3 parallel computers. Each block takes an Exponential amount of ti
    6·1 answer
  • Suspicious activity, like IP addresses or ports being scanned sequentially, is a sign of which type of attack?
    7·1 answer
  • 3. Write a program to find the area of a triangle using functions. a. Write a function getData() for user to input the length an
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!