Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

Unlock your academic potential

© 2024 | Zucol Services PVT LTD | All rights reserved.

Added on 2019/09/19

|2

|724

|135

Project

AI Summary

This assignment requires creating a prototype of a set of numbers called Average sum using object-oriented programming. The goal is to group digits to reach a desired target number by clicking on single names or sliding between two numbers. The game also has an optional 'Find Mean' feature, which calculates the average of the grouped numbers. The application will have three buttons: NEXT, GIVE UP, and RESET. A new game can be created by generating a random solution with a specified number of groupings, each consisting of randomly chosen numbers between 1-9 or 10-99 inclusive.

Your contribution can guide someone’s learning journey. Share your
documents today.

Laboratoire 1

GTI100 – Programmation en génie des TI

Durée : 3 semaines

Pondération : 10 %

Scénario

The aim of this laboratory is to perform a small set of numbers using the basic concepts of object-

oriented programming. In this scenario, you are mandated by a company, CasualMathApps, to realize

the prototype of a new set of numbers called Average sum, the basic concept is as follows: Given a

purpose ("Goal" in the example: 73) and a sequence of digits (in the example: 6 3 2 2 6), it is

requested to group the digits for the old names they have Somme gives the desired goal. In the

example: 63 + 2 + 2 + 6 = 73. A player determines the numbers he wishes to group by selecting the

cases: either by clicking on a single name or by clicking on a number and by sliding on the second

one (for example from 6 to 3 to give 63). Each time, a different color is assigned for a new grouping.

The unselected cases are white. In the example, the player to group 6 and 3 for the former 63, and

clicked on the first 2. It has to click on the other digits 2, then 6, to reach 73 and win. All the boxes

must be grouped together. When a player wins, all cases go green. If the player gathers all the cases

and the sum of the numbers formed does not correspond to the goal to be reached, then all cases

turn red. The information is displayed: the goal to be reached, the sum formed by the currently

grouped names, and the current number of groupings made by the player (in parentheses on the

capture).

GTI100 – Programmation en génie des TI

Durée : 3 semaines

Pondération : 10 %

Scénario

The aim of this laboratory is to perform a small set of numbers using the basic concepts of object-

oriented programming. In this scenario, you are mandated by a company, CasualMathApps, to realize

the prototype of a new set of numbers called Average sum, the basic concept is as follows: Given a

purpose ("Goal" in the example: 73) and a sequence of digits (in the example: 6 3 2 2 6), it is

requested to group the digits for the old names they have Somme gives the desired goal. In the

example: 63 + 2 + 2 + 6 = 73. A player determines the numbers he wishes to group by selecting the

cases: either by clicking on a single name or by clicking on a number and by sliding on the second

one (for example from 6 to 3 to give 63). Each time, a different color is assigned for a new grouping.

The unselected cases are white. In the example, the player to group 6 and 3 for the former 63, and

clicked on the first 2. It has to click on the other digits 2, then 6, to reach 73 and win. All the boxes

must be grouped together. When a player wins, all cases go green. If the player gathers all the cases

and the sum of the numbers formed does not correspond to the goal to be reached, then all cases

turn red. The information is displayed: the goal to be reached, the sum formed by the currently

grouped names, and the current number of groupings made by the player (in parentheses on the

capture).

Need help grading? Try our AI Grader for instant feedback on your assignments.

Option supplémentaire

In addition, a game option is required: • The Find Mean option requires that the goal is rather the

average of the numbers grouped together. For example: Average of 7 for 6 1 2 5 5 gives 7 = (6 + 12 +

5 + 5) / 4 The option must be activated / deactivated by means of a check box, taken into account in

the following section.

Interface

The graphical interface of the capture is given as an indication, these are the features that are

important. The application must contain three NEXT, GIVE UP and RESET buttons, operating as

follows:

NEXT New game

GIVE UP Displays the solution, coloring the right numbers

RESET Returns the player's groupings to zero, and returns all the boxes to a

white background

Création d'une partie

The creation of a game is done by generating a solution in the following way:

1. Random choice of a number between 3 and 6 inclusive which represents the number of groupings

in the solution (for example 4)

2. For each grouping (i.e. number), one chooses, with a probability of 0.7, a number between 1 and 9

included, otherwise a number between 10 and 99 inclusive (e.g., 23, 5, 11, 6)

3. The generated numbers (displayed in the console) can then be: 1. summed, to give the goal to be

reached (23 + 5 + 11 + 6 = 45) 2. concatenated, to obtain a sequence of digits to be displayed in the

boxes (235116)

4. In the case of an average, a solution must be found so that the division of the numbers obtained is

an integer (for example, 45/4 does not give an integer, it is necessary to modify the numbers

generated so that their sum gives 44 or 48, which would give 11 or 12 as the goal)

5. The numbers obtained must be saved as a solution which will be used to test whether the

groupings are valid, or if the player decides to give up (with the GIVE UP button).

In addition, a game option is required: • The Find Mean option requires that the goal is rather the

average of the numbers grouped together. For example: Average of 7 for 6 1 2 5 5 gives 7 = (6 + 12 +

5 + 5) / 4 The option must be activated / deactivated by means of a check box, taken into account in

the following section.

Interface

The graphical interface of the capture is given as an indication, these are the features that are

important. The application must contain three NEXT, GIVE UP and RESET buttons, operating as

follows:

NEXT New game

GIVE UP Displays the solution, coloring the right numbers

RESET Returns the player's groupings to zero, and returns all the boxes to a

white background

Création d'une partie

The creation of a game is done by generating a solution in the following way:

1. Random choice of a number between 3 and 6 inclusive which represents the number of groupings

in the solution (for example 4)

2. For each grouping (i.e. number), one chooses, with a probability of 0.7, a number between 1 and 9

included, otherwise a number between 10 and 99 inclusive (e.g., 23, 5, 11, 6)

3. The generated numbers (displayed in the console) can then be: 1. summed, to give the goal to be

reached (23 + 5 + 11 + 6 = 45) 2. concatenated, to obtain a sequence of digits to be displayed in the

boxes (235116)

4. In the case of an average, a solution must be found so that the division of the numbers obtained is

an integer (for example, 45/4 does not give an integer, it is necessary to modify the numbers

generated so that their sum gives 44 or 48, which would give 11 or 12 as the goal)

5. The numbers obtained must be saved as a solution which will be used to test whether the

groupings are valid, or if the player decides to give up (with the GIVE UP button).

1 out of 2