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
Your organization has hired a penetration tester to validate the security of your environment. The penetration tester needs to d
yulyashka [42]

Answer:

Port scanner

Explanation:

The penetration tester would most likely use a port scanner. A port scanner can be explained to be an application that is made to check a server or host for ports that are open. This application can also be used by administrators to check their security networks so as to know those network services that are running on a host and also to know existing vulnerabilities. Attackers also use this to exploit victims.

5 0
3 years ago
What platform was PlayerUnknown’s Battlegrounds release on in March of 2018?
sveticcg [70]

Solution:

The game was released for Microsoft Windows via Steam’s early access beta program in March 2017, with a full release on December 20, 2017. That same month, the game was released by Microsoft Studios for the Xbox One via its Xbox Game Preview program, and officially released in September 2018. In early 2018, it was localized and released by Tencent Games in China, while two mobile versions based on the game for Android and iOS were also released. The game is one of the best-selling of all time, with over fifty million sold across all platforms by June 2018. In addition, the Windows version holds a peak concurrent player count of over three million on Steam, which is an all-time high on the platform.

Battlegrounds presented new types of gameplay that could be easily approached by players of any skill level and was highly replay-able. The game received several Game of the Year nominations among other accolades, and is considered by Greene to be the defining game of the battle royal genre. Several other video games, following in Battleground’s success, added battle royal-style modes, while a number of clones, primarily out of China, also appeared. PUBG Corporation has run several small tournaments and introduced in-game tools to help with broadcasting the game to spectators, as they wish for it to become a popular eSport.

Loot boxes! More loot boxes! Locked loot boxes! Selling loot boxes! Cheating for loot boxes! This has been the story of player Battleground for a few months since developer PUBG Corp (a division of Blue hole) has slowed down on making their flagship game better.


4 0
3 years ago
Read 2 more answers
Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
Maksim231197 [3]

Answer:

Question is incomplete. it needs a topology diagram and also it needs Router R1 table. I assume User has access to the topology and Routing table.

Below Configuration will help to fix ACL problem

Hosts from the 172.16.0.0/16 network should have full access to Server1, Server2 and Server3 but this is not currently the case, as L1 can’t communicate to Server2 or Server3.

Explanation:

Following Configuration on Cisco Router R1 will help to fix all the ACL problems.

enable

configure terminal

no ip access-list standard FROM_10

ip access-list standard FROM_10

deny host 10.0.0.2

permit any

exit

!

no ip access-list standard FROM_172

ip access-list standard FROM_172

permit host 172.16.0.2

exit

!

interface GigabitEthernet0/0

ip access-group FROM_192 out

end

write memory

!

7 0
3 years ago
Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "To
Ludmilka [50]

Answer:

#include <iostream>

using namespace std;

void PrintPopcornTime (int bagOunces){

   if (bagOunces < 2){

       cout << "Too small"<<endl;

   }

   else if (bagOunces > 10){

       cout << "Too large"<<endl;

   }

   else{

       cout << bagOunces*6 <<" seconds"<<endl;

   }

}

int main(){

   PrintPopcornTime(7);

   

   return 0;

}

Explanation:

Create a function called PrintPopcornTime that takes one parameter, bagOunces

Check the bagOunces using if-else structure. If it is smaller than 2, print "Too small". If it is greater than 10, print "Too large". Otherwise, calculate and print 6*bagOunces followed by " seconds".

Call the function in the main function with parameter 7. Since 7 is not smaller than 2 or not greater than 10, "42 seconds" will be printed.

4 0
3 years ago
Please help, will give brainliest!!! I need help with these coding questions, any help is appreciated
olchik [2.2K]

Answer:

class Foo:

   def F(self, n):

       if n == 1:

           return 1

       return self.F(n - 1) + 3 * n - 2

Explanation:

This should cover part a to this question. The thing I'm not sure on is they use the term "method" which in python technically means a class function...but then list one argument with the function call which makes me think it is possibly just supposed to be a regular function. Which would be the following snippet. It would depend on if you are using classes or not yet in your coding class.

def F(n):

   if n == 1:

       return 1

   return F(n - 1) + 3 * n - 2

Play around with it and look into python "lists" and "for loops" for part c. Part b I'm not sure what kind of example they want since I'm not in that class. Good luck!

8 0
3 years ago
Other questions:
  • Which cloud computing service model gives software developers access to multiple operating systems for testing?
    5·1 answer
  • In modern computer systems, a byte consists of
    14·1 answer
  • You can be sentenced to up to 180 days in jail for driving with a license that was suspended for _________ .
    15·1 answer
  • Which of the following sentences uses the correct verb tense?
    8·2 answers
  • Information is a valuable asset and not everyone in the world can be trusted with it. Therefore, we need to protect our valuable
    10·1 answer
  • Which command allows d1 to configure an ip address on one of its physical interfaces?
    9·1 answer
  • Which factors are involved in search engine optimization​
    10·1 answer
  • What is Digital Citizen? It's one of my classes.
    5·1 answer
  • Which type of shape allows you to add text that can be moved around.
    11·1 answer
  • You would like to see only the last 15 lines of /home/user/log file on your linux machine. Which command line interface (cli) co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!