Find Jobs
Hire Freelancers

VBA code Virtual Playing Cards

$10-30 CAD

Imekamilika
Imechapishwa about 1 year ago

$10-30 CAD

Kulipwa wakati wa kufikishwa
Task 1: Create a deck of cards. [login to view URL] a class of objects called Card that has two variables. One called rank of type integer and the other called suit of type string. The possible values for suite are “H” for Hearts, “C” for Clubs, “D” for Diamonds and “S” for Spades. Possible values for rank are integers 1 to 13 with Aces represented by the number 1 and jack, queens, and kings by the numbers 11, 12, and 13 respectively. The Queen of Hearts would be written as the string “H12”. [login to view URL] a procedure called createCard that has argument of aCard as Card, aRank as integer, aSuit as string that is passed these three values and returns a card set equal the aRank and aSuit. [login to view URL] a dummy procedure called dummy that has no arguments. In that procedure create a variable called aDeck of type Collection. [login to view URL] another procedure called addCard that has argument of aCard as Card and aDeck as Collection. The only thing this procedure does is add a card to the collection aDeck. [login to view URL] a procedure called createDeck that has one argument aDeck of type Collection. This procedure should use several for-next loops to create a full deck of cards, i.e., 13 cards each of each suit. The full deck is passed back to the calling procedure. Shuffling the deck of cards: [login to view URL] a procedure called shuffleDeck that has one variable called aDeck of type Collection passed to it. [login to view URL] two variable of type Collection in this procedure called Deck1 and Deck2. Set Deck1 equal to aDeck. Set Deck2 to a new Collection that is empty. [login to view URL] another variable of called aCard of type Card and a variable called itemsInDeck1 of type integer. Generate a random number between1 and the number of cards in Deck1. Remove the card at that index location from Deck1 and add it to Deck2. Repeat this procedure until there are no more cards in Deck1. At this point all of the cards are in deck 2 in a random order; they have been shuffled! Set aDeck equal to Deck2. The shuffled deck will be passed back to the calling procedure. Dealing out the card to n players in hand of m cards: [login to view URL] a procedure called dealCards with no arguments. Create a variable called aDeck and fill it with cards and shuffle them. Next you need to create a collection called hands that has in it a number of collections equal to the number of players, n. Each of those collections is a hand of cards and consists of m cards. [login to view URL] next step is to create two nested form next loops that removes one card from aDeck and adds that card to each hand in turn. Once n time m card have been dealt you are finished. [login to view URL] another set of nested for next loops that writes a header called hand1 to column A1 and then writes the card in that hand below that label. Repeat for the other hands in the columns to the right. [login to view URL] alternative to Step 11 is to create shapes that are the same as card and have the correct value written on them and displayed on the worksheet. Hint use the macro recorder to figure out how to draw rectangles rounded corners. Your worksheet should look similar to the following
Kitambulisho cha mradi: 35851977

Kuhusu mradi

2 mapendekezo
Mradi wa mbali
Inatumika 1 yr ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
Imetolewa kwa:
Picha ya Mtumiaji
Hello I am a developer with rich experiences on VBA, .NET, C#. For 7+ years. I have full confident to complete your project. I can work by full time for your project and trying to satisfy the requirements. I would appreciate if you give me more spec via private chat. Thanks Regards. Doan https://www.freelancer.com/u/duyenanh200219
$20 CAD ndani ya siku 1
5.0 (1 hakiki)
2.7
2.7
2 wafanyakazi huru wana zabuni kwa wastani $20 CAD kwa kazi hii
Picha ya Mtumiaji
⚛️ Expert for VBA , OOP, Algorithm, able to start right now ⚛️ Hello, I am senior developer with enough experiences on VBA , OOP, Algorithm. For 7+ years. so I have confident to complete your project. I can work by full time for your project and trying to satisfy the requirements. I am designing the project from scratch and structure it well. "Client's idea + Programmer's robotic coding is the perfect result" This is my idea. If you want to the perfect result, please contact with me. https://www.freelancer.com/u/vd58xd24
$20 CAD ndani ya siku 1
5.0 (2 hakiki)
2.2
2.2

Kuhusu mteja

Bedera ya CANADA
Vancourver, Canada
5.0
1
Njia ya malipo imethibitishwa
Mwanachama tangu Jan 27, 2023

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.