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
Select the correct answer.
kicyunya [14]

Answer:

D

Explanation:

pecialisation - departments focus on one area of work. productivity - specialism means that staff are skilled in the tasks they do. accountability - there are clear lines of management. clarity - employees understand their own and others' roles.

7 0
3 years ago
Read 2 more answers
20 points!!
creativ13 [48]
I think it’s C considering what clip art is, you put in pictures. i’m crying with you
3 0
2 years ago
Could anyone beat my typing?<br><br> https://keyma.sh/custom/33K7C
insens350 [35]

Answer:

This should not be typed in brainly. Brainly is for answering questions

Explanation:

8 0
3 years ago
Is there similarities between plagiarism and software piracy? explain.​
xz_007 [3.2K]
<h3><u>Plagiarism</u></h3>
  • Plagiarism means using someone else's ideas or words without crediting source.
<h3><u>Pirac</u><u>y</u></h3>
  • Piracy is unauthorized use, reproduction, or sharing of copyrighted material.
3 0
2 years ago
The DHCP server is configured with the address lease duration set at 5 days. An employee returns to the office after an absence
Wewaii [24]

Answer:

both MAC and IPv4 addresses of the DHCP server

FF-FF-FF-FF-FF-FF and IPv4 address of the DHCP server

FF-FF-FF-FF-FF-FF and 255.255.255.255

MAC address of the DHCP server and 255.255.255.255

Explanation:

When the lease of a dynamically assigned IPv4 address has expired, a workstation will send a DHCPDISCOVER message to start the process of obtaining a valid IP address. Because the workstation does not know the addresses of DHCP servers, it sends the message via broadcast, with destination addresses of FF-FF-FF-FF-FF-FF and 255.255.255.255.

3 0
3 years ago
Read 2 more answers
Other questions:
  • if i set my payment and use free trial on Scribd website, can i cancel my payment and NOT PAYING after one month??
    8·1 answer
  • Because log-on procedures may be cumbersome and tedious, users often store log-on sequences in their personal computers and invo
    6·1 answer
  • Can someone please help??
    12·1 answer
  • DSSS uses a chipping code to encode redundant data into the modulated signal. Which two of the following are examples of chippin
    12·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • Technological advances have made cyberbullying
    5·1 answer
  • Strengths and weaknesses about esport
    10·1 answer
  • A list is sorted by selecting the largest element in the list and swapping it with the last one. This technique is called ______
    7·1 answer
  • What principle of interaction is John using?
    9·2 answers
  • What is the significance of XML tags?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!