You are on page 1of 4

Task C2 & C3.

Creating the Product (Process Journal)


Step 1: Search for the suitable variable type to store data of the card.

Through this process, I utilize critical thinking skill and research skill to match up my needs.
Since I’m not familiar with this data structure, I need programs with illustration to help me
understand the mechanics. Furthermore, I need to use critical thinking skill to match the
characteristic of the data structure with my needs.

Characteristic of map (Research): variable type “map” can store any kinds of “key” and “value”.
It can be used for my program since I could define “key” as a string value to store the name of
the card, and value as hit point and other data. However, the use of “map” requires iterator,
which is very complex, which requires more efforts to understand how does “map” store values
and data.

On the other hand, using data structure, I can store all data for a card in an element of array.
Comparing to “map”, data structure does not require the use of iterator, which is much
convenient. Furthermore, when we are calculating the average data of the deck, all variable’s
name is in the same format, which means it will be much easier to memorize.

Step 2: Search for all card’s information in “Clash Royale” and store information of cards as
data structure
Throughout the second step, I utilize critical thinking by applying my coding knowledge into the
program. I actively and constantly considering the basic grammar of the coding language to
avoid compilation error. Secondly, I utilized my organizing skill to organize my program in a clear
order and separate blocks. I place the relevant data of a card in a block of order, so it will be
much easier to access when finding it.

In this step, I define a data structure called “data”. In the structure “data”, it contains 5 different
elements: name, hit point, damage, elixir and mobility. Then I define an algorithm called
designate to assign values to each card. I will input the value of the card according to the data
base of “Clash Royale”. However, since there are 119 cards in “clash royale” in total, it takes a
long time to complete all of them. However, with persistence, I complete the program with
patient.

Step 3: Interaction with the user


Throughout the process, I utilized creative thinking skill by applying my coding knowledge into
my program. To remind the user of input date, I output the sentence “input your preferred
card”. Then use a circulation to make input more convenient and concise.

In the second part of the program is the main function, which creates the interaction with the
user. The first part in the main function asks the user to input 8 preferred cards by asking “Input
Preferred Cards:”. Then the program will start to run the “designate” function mentioned
before, so all elements in the card array had been given a value. However, the management and
organization of variable has been a huge problem, since it requires large number of efforts to
distinguish each variable. However, with patient, I finally finished the organization process.

Step 4: Calculation

Through this process, I utilize communication and critical thinking to evaluate the most
appropriate process for data calculation. Throughout the process, I had discussed with my math
teacher and several friends who are “clash royale” players. Therefore, I discovered the clear
boundary for each level in mobility. Furthermore, I had applied the average formula correctly
into the program correctly.

To calculate the sum of the 8 input cards, I utilize 4 variables to calculate the sum by using the
following formula:
∑ hit point +¿ card [ j ] . hit point
∑ damage+ ¿ card [ j ] . damage
∑ elixir+¿ card [ j ] . elixir
∑ mobility +¿ card [ j ] .mobility
According to the formula to calculate the average: ¿ ¿, all sums will be calculated through this
formula and output the result they receive. For mobility rating, it divides into 4 different
sections: poor, medium, fast, very fast. The following is the logic flow of the program:
Through this process, I had utilized critical thinking skill to divide the rating into 4 different
sections. I evaluate the ability of the card by considering the average mobility sum of 8 cards,
which helps me to provide a well evaluated rating.

Step 5: Complete star rating algorithm

In step 5, I had evaluated the importance of every factor in a deck include: hit point, damage,
elixir, and mobility. Then according to the importance order and its percentage, I had provided
different weight for the card deck evaluation. Finally, I will output the answer based on the 5-
star rating system.

Throughout the programming process, I first demonstrated my communication and research


skill to find the weight percentile of each factor in the deck. I find contact players who are
current playing the game and ask them to order these factors based on importance. Since the
elixir made the greatest impact on the deck performance, so the rating will impact the most
significant when the deck cost higher elixir.

However, in the initial stage of the evaluating factor, I consider to make it more detail by having
decimals in the rating system. Later, I found out the algorithm incorporate with decimal requires
more advanced calculation. Therefore, for simplifying purposes, I had limit the calculation only
to adding and making the result as an integer.

You might also like