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
Nunya is a computer software company that employs highly intelligent, but somewhat unusual people. Every Friday, free lollipops,
mario62 [17]

Answer:

c. Stories

Explanation:

Informing employees about the founders by telling them at the beginning of each quarterly executive meeting, that the founders were three young people who got lucky and sold a video game that they invented is an example of stories technique for transmitting culture.

Cultural transmission is a learning process through which cultural elements, such as background ideas, attitudes, beliefs, ideals and historical values are passed on to individuals and groups.

3 0
3 years ago
For each of the following application areas state whether or not the tree data structure appears to be a good fit for use as a s
Cerrena [4.2K]

Answer:

a) Chess game moves:- Tree data structure is not a good fit.

b) Public transportation paths:- Tree data structure is not a good fit.

c) Relationshi[p among computer files and folders:- Tree data structure is a good fit.

d) Genealogical information:- Tree data structure is a good fit.

e) Parts of books:- Tree data structure is a good fit.

f) Programming language history:- Tree data structure is not a good fit.

g) Mathematical expression:- Tree data structure is a good fit.

Explanation:

a) Chess game moves:- Tree data structure is not a good fit. Since in tree data structure moving backward or sharing the node is not that much easy. Presume, In chess, you have to check any box is empty or not. Here, Graph is the best fit.

b) Public transportation paths:- Tree data structure is not a good fit. whenever shortest path, routes, broadcast come always graph is a good option. Because in the tree you don't know how many time you visit that node

c) Relationshi[p among computer files and folders:- Tree data structure is a good fit. Since they have a predefined route. Go to 'c' drive. Open a particular folder and open a particular file.

d) Genealogical information:- Tree data structure is a good fit. Since genealogical information also has a predefined route. Here, the Graph is not suitable.

e) Parts of books:- Tree data structure is a good fit. Since manages the chapters and topics are not that much complex. You can see any book index which is in a very pretty format.

f) Programming language history:- Tree data structure is not a good fit. To store the history of the programming language we need some unconditional jumps that's why the tree is not suitable.

g) Mathematical expression:- Tree data structure is a good fit. The tree is suitable in some cases. We have an expression tree for postfix, prefix.

5 0
3 years ago
What are spreadsheets in a excel workbook called? A. pages B. notepads C.graphs D.worksheets
galina1969 [7]
D. Worksheets
I’m positive this is the correct answer
4 0
3 years ago
What does the % find
Sever21 [200]

Answer:

The FIND function returns the position (as a number) of one text string inside another. If there is more than one occurrence of the search string, FIND returns the position of the first occurrence. FIND does not support wildcards, and is always case-sensitive.

Explanation:

4 0
2 years ago
What is profession explain with example​
WARRIOR [948]

Answer:   a profession is a job, or what you do for a living

example : a teacher is an example of proffesion

4 0
3 years ago
Read 2 more answers
Other questions:
  • What country threatens Denmark at the beginning of Hamlet as evidenced in Marcellus’s question, "Why this same strict and most o
    13·1 answer
  • The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create
    10·1 answer
  • The three tasks within data harmonization, namely: data consolidation, data cleansing, and data formatting use techniques called
    8·1 answer
  • Which of the following lines of code is syntactically correct?
    14·1 answer
  • The length property of the String object returns
    15·1 answer
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • Help plz. due yesterday
    13·1 answer
  • 1)What is the hydropower resources/energy?
    7·1 answer
  • Select each of the steps involved in creating a table in a presentation.
    12·1 answer
  • Think of some local businesses that have websites. Look online and identify two different websites for businesses or services in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!