Skip to content

Commit ff7ed67

Browse files
Update lab instructions to remove console input
1 parent fa8ab81 commit ff7ed67

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

courses/ada_essentials/100_packages/88-packages.lab.rst

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ Packages Lab
88

99
* Requirements
1010

11-
- Create a program to add and remove integer values from a list
11+
- Create a program to build a list of simple mathematical equations and then
12+
print out if, for each equation in the list, the result would be in range
1213

13-
- Program should allow user to do the following as many times as desired
14-
15-
- Add an integer in a pre-defined range to the list
16-
- Remove all occurrences of an integer from the list
17-
- Print the values in the list
14+
- Equations are two floating point numbers and a simple operation (+, -, *, /)
1815
1916
* Hints
2017

21-
- Create (at least) three packages
18+
- You should create the following packages
2219

23-
1. minimum/maximum integer values and maximum number of items in list
24-
2. User input (ensure value is in range)
25-
3. List Abstract Data Machine
20+
- Types package that creates a numeric range, an equation record type, and
21+
a mechanism to convert the record to a string
22+
- Validation package to verify that the equation result would be in range
23+
- List package to store the list of equations, and a mechanism to retrieve
24+
each item in the list
2625

2726
- Remember: :code:`with package_name;` gives access to :code:`package_name`
2827

@@ -40,23 +39,21 @@ Creating Packages in :toolname:`GNAT Studio`
4039
- Fill in name of Ada package
4140
- Check the box if you want to create the package body in addition to the package spec
4241

43-
-----------------------------------
44-
Packages Lab Solution - Constants
45-
-----------------------------------
46-
47-
.. container:: source_include 100_packages/lab/packages/answer/constants.ads :code:Ada :number-lines:1
42+
-------------------------------
43+
Packages Lab Solution - Types
44+
-------------------------------
4845

49-
.. container:: speakernote
46+
.. container:: source_include 100_packages/lab/packages/answer/types.ads :code:Ada :number-lines:1
5047

51-
Could use functions where the value is stored in the body - less recompilation if the value changes (but then they cannot be universal integers)
48+
.. container:: source_include 100_packages/lab/packages/answer/types.adb :code:Ada :number-lines:1
5249

53-
------------------------------
54-
Packages Lab Solution - Input
55-
------------------------------
50+
------------------------------------
51+
Packages Lab Solution - Validation
52+
------------------------------------
5653

57-
.. container:: source_include 100_packages/lab/packages/answer/input.ads :code:Ada :number-lines:1
54+
.. container:: source_include 100_packages/lab/packages/answer/validator.ads :code:Ada :number-lines:1
5855

59-
.. container:: source_include 100_packages/lab/packages/answer/input.adb :code:Ada :number-lines:1
56+
.. container:: source_include 100_packages/lab/packages/answer/validator.adb :code:Ada :number-lines:1
6057

6158
-----------------------------------
6259
Packages Lab Solution - List

0 commit comments

Comments
 (0)