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
Lorico [155]
3 years ago
14

Now write the outline of a Class called BulgarianSolitaire. Remember, what does this class need to "know" and what does it need

to "do"? I want you to write pseudo code for how this Class can play Bulgarian Solitaire with 45 cards. What is a triangular number???
Computers and Technology
1 answer:
torisob [31]3 years ago
7 0

Answer:

import java.util.ArrayList;

import java.util.Collections;

class Bulgarian

{

  public static void main(String[] args)

  {

      max_cards=45;

      arr->new ArraryList

      col=1;

      card=0;

      left=max_cards;

      do{

          col->random number

          row->new ArrayList;

          for i=0 to i<col

          {

              card++

              add card into row

          }

          add row into arr

          left=max_cards-card;

      }while(card<max_cards);

      finish->false

      while(!finish)

      {

          for i=0 to arr.size()

              remove one card from each row

          add row into arr

          size->new ArrayList;

          for i=0 to i<arr.size()

              add arr[i] into size

          sort(size)

          for i=1 to size.size()

              if ith element is equals to (i-1)+1

                  finish->true

              else

                  finish->false

          for i=0 to i<arr.size()

              print->arr elements

      }

  }

}

You might be interested in
________ network each device is connected directly to a central network switch.
Svetradugi [14.3K]
IN THE network, each device is connected directly to a central switch.
6 0
4 years ago
4. When emergency changes have to be made to systems, the system software may have to be modified before changes to the requirem
Vikentia [17]

Answer:

Incremental model

Explanation:

Incremental model is the best modification in older version are feasible and can be easily managed.

Incremental model involves the technique of developing soft ware in which the product is designed implemented and tested in stages until the product is finished. The term finished here means the product as meet all its requirement.

This model entails development as well as maintenance.

7 0
3 years ago
Writea SELECT statement that uses the ranking functions to rank products by the total quantity sold. Returnthese columns:The pro
Nataliya [291]

Answer:

SELECT  product_name, SUM(DISTINCT quantity) AS total_quantity

RANK() OVER (PARTITION BY total_quantity ORDER BY product_name) AS rank,

DENSE_RANK () OVER (ORDER BY quantity DESC) AS dense_rank

FROM Order_items

JOIN products ON Order_items.product_id = products.product_id

GROUP BY product_id

Explanation:

The SQL query returns four columns namely, product name, total quantity, rank and dense rank. The query uses the rank and the dense rank function to return the rows according to numeric ranks.

5 0
3 years ago
Which command is used to encrypt all passwords in a router configuration file?
Veseljchak [2.6K]

Answer:

Service Password encryption

Explanation:

It is noted that the command used on routers, to get the data of all the passwords in a router configuration file encrypted is the service password encryption.

Service password encryption solely affects plain text passwords types that includes that of the line passwords or that of the enable password. The feature uses a simple substitution method to create a "secure" non-text password displayed in the configuration.

8 0
3 years ago
What are the characteristics of the Global Address List? Check all that apply.
nignag [31]

Answer:

It is the very last statement (bottom). Also copied to the the client

Explanation:

3 0
3 years ago
Other questions:
  • You have implemented nap with dhcp enforcement, so you need to ensure you have an updated anti-virus software package, an update
    7·1 answer
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • Alicia is a dietitian. She gives other people suggestions for nutrition. She wants to organize a large amount of data concerning
    8·2 answers
  • At the Network layer, what type of address is used to identify the receiving host?
    10·1 answer
  • [Submit on zyLabs] Please write a function with one input, a matrix, and one output, a matrix of the same size. The output matri
    10·1 answer
  • What are the five layers in the internet protocol stack? What are the principal responsibilities of each of these lay?
    9·1 answer
  • Brad is joining a big website design firm. He is worried that he may not be able to adapt to the company culture. What can he do
    15·1 answer
  • Identify whether each of the following goals would be a short-term or long-term goal for a high school senior who will graduate
    12·2 answers
  • Suppose you begin with an empty binary search tree, and want to add all the positive integers from 1 through 31 to the tree. If
    5·1 answer
  • You have been hired by a small company to install a backbone to connect four 100base-T Ethernet LANs (each using one 24-port hub
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!