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
Kyle wants to access his school’s home page. How can he do this?
Vedmedyk [2.9K]

First, he needs to have a computer that is connected to the internet, then secondly kyle needs to know the URL/website of his school, thirdly, he needs to enter the URL into the browser on his computer, this takes him straight to his schools' Homepage.

6 0
3 years ago
Read 2 more answers
For this project, you'll be given information to create a business report using word processing software. Suppose you want to op
fiasKO [112]

Answer:

Business Plan: for a Car Wash company

Tools and ingredients required: Water tanker: $250s, Self-service water supply set up: $160s. two helpers one for washing, and one as cashier: $1000s per month Salary, water supply: through boring, one-time expense :$1000s. A place ( in the ready state apart from above-mentioned requirements) one rent: $800s monthly rent.

Total investment required: $4210s + $2000s( as security).= $6210s.

Work Details:

The car will be washed with water. And we have not mentioned the Mobil here, as that work will be outsourced. A petrol pump employee will always be at the car wash center to apply the Mobil to the vehicle after washing. And the only vehicle entertained is the car, however, the model of the car does not matters.

The income is daily deposited in the company bank account, and digital payment is also accepted.

Hope our car wash business succeeds.

Explanation:

Please check the answer section.

3 0
3 years ago
Although the Earth's crust formed relatively early in the Earth's history, it was not present when the Earth first began to form
zlopas [31]
The Earth is older than 4.28 billion years
5 0
3 years ago
Read 2 more answers
Write a setInterval() function that increases the count by 1 and displays the new count in counterElement every 300 milliseconds
Alina [70]

Answer:

  1. var count = 0;
  2. var counterElement = document.getElementById("counter");
  3. counterElement.innerHTML = count;
  4. var a = setInterval(
  5.    function(){  
  6.        count++;
  7.        counterElement.innerHTML = count;
  8.        if(count == 5){
  9.            clearInterval(a);
  10.        }
  11.    }
  12.        , 300);

Explanation:

The solution code is given from Line 6 - 15.  

setInterval function is a function that will repeatedly call its inner function for an interval of time. This function will take two input, an inner function and the interval time in milliseconds.  

In this case, we define an inner function that will increment count by one (Line 8) and then display it to html page (Line 9). This inner function will repeatedly be called for 300 milliseconds. When the count reaches 5, use clearInterval to stop the innerFunction from running (Line 11 - 13).  

8 0
3 years ago
What was the effect of the norman conquest on the language of britain?
Maslowich
Option c is answer because most of us are literature in English
6 0
3 years ago
Other questions:
  • Which act requires financial institutions to ensure the security and confidentiality of customer data and mandates that data mus
    8·1 answer
  • The purpose of a software design is to enable programmers to implement the requirements by designating the projected parts of th
    14·1 answer
  • Union Carbide accident safety policies and procedures were not followed was due to
    14·1 answer
  • Write a Java program that creates a two-dimensional array of type integer of size x by y (x and y must be entered by the user).
    7·1 answer
  • Please tell fast plzzzzzzzz​
    11·2 answers
  • How many constructors are there in the following class declaration?class CashRegister { public: CashRegister(); CashRegister(int
    8·1 answer
  • I need a C++ program to ask the user to put in different numbers until zero is pressed then the program counts the numbers that
    10·1 answer
  • Como se llaman las herramientas y maquinas pque utilizan para hacer cosas artesanales
    10·1 answer
  • What is the purpose of a format painter in Word?
    15·2 answers
  • When proofreading, you should do all of the following except _____.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!