The question covers concepts in all the seminars. Apply data structures to store and process information. Employ structure programming and use of functions to make the program modular. MonkeyPrint is a company that provides shirt embroidery services. The prices (in cents) for sewing characters onto clothing are shown in Table 4-1. For example, the price of sewing an uppercase 'H' is 45 cents and a lowercase 'a' is 63 cents. Characters not found in Table 4-1 cannot be embroidered. Pricing for font size 24pts C 60 3 49 A 44 H 45 0 56 V 49 c 37 j 50 9 55 x 53 # 64 B 79 I 38 P 53 W 46 d 55 k 51 r 53 y 54 . 30 Q41 X 48 e 63 1 36 s 61 z 39 36 > D 56 K 51 R 58 Y 54 f 58 m 32 t 57 ! 36 < 38 E 46 L 36 S 65 Z 52 g 40 n 58 u 37 & 65 > 38 F 50 M 48 T 36 a 63 h 31 0 50 v 33 * 65 ? 45 G 65 N 55 U 23 b 55 1 35 p 55 w 59 $65 @65

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.3: Random File Access
Problem 6E
icon
Related questions
Question

screen shot output of the code

 

 

 

 

The pricing above applies to standard font size 24 pts, while font size 36 pts will cost 1.5
times and font size 48 pts will cost 2 times.
Both the characters' pricings and the fonts' pricings are stored in files, as these can change
anytime. (See Appendix A)
Write the following functions.
(i) readPricing(filename: string, pricing: dictionary) where the parameter is a
string representing the filename that the pricing is stored. This function reads
the file and store the keys and values into the given dictionary. The keys are the
characters, and the values are the pricings.
(a)
Using readPricing(), we can setup the character's pricing dictionary and fonts'
pricing dictionary, by providing the appropriate filenames.
Transcribed Image Text:The pricing above applies to standard font size 24 pts, while font size 36 pts will cost 1.5 times and font size 48 pts will cost 2 times. Both the characters' pricings and the fonts' pricings are stored in files, as these can change anytime. (See Appendix A) Write the following functions. (i) readPricing(filename: string, pricing: dictionary) where the parameter is a string representing the filename that the pricing is stored. This function reads the file and store the keys and values into the given dictionary. The keys are the characters, and the values are the pricings. (a) Using readPricing(), we can setup the character's pricing dictionary and fonts' pricing dictionary, by providing the appropriate filenames.
The question covers concepts in all the seminars. Apply data structures to store and process
information. Employ structure programming and use of functions to make the program modular.
MonkeyPrint is a company that provides shirt embroidery services. The prices (in cents) for
sewing characters onto clothing are shown in Table 4-1. For example, the price of sewing an
uppercase 'H' is 45 cents and a lowercase 'a' is 63 cents. Characters not found in Table 4-1
cannot be embroidered.
Pricing for font size 24pts
‒‒‒‒‒‒
A 44
H 45
0 56
V 49
C 37
j 50
q 55
x 53
# 64
B 79
I 38
P 53
W 46
d 55
k 51
r 53
y 54
30
C 60
J 49
Q 41
X 48
e 63
1 36
s 61
z 39
36
>
D 56
K 51
R 58
Y 54
f 58
m 32
t 57
! 36
<38
E 46
L 36
S 65
Z 52
g 40
n 58
u 37
& 65
> 38
Table 4-1
F 50
M 48
T 36
a 63
h 31
o 50
v 33
*65
? 45
G 65
N 55
U 23
b 55
1 35
p 55
w 59
$ 65
@65
Transcribed Image Text:The question covers concepts in all the seminars. Apply data structures to store and process information. Employ structure programming and use of functions to make the program modular. MonkeyPrint is a company that provides shirt embroidery services. The prices (in cents) for sewing characters onto clothing are shown in Table 4-1. For example, the price of sewing an uppercase 'H' is 45 cents and a lowercase 'a' is 63 cents. Characters not found in Table 4-1 cannot be embroidered. Pricing for font size 24pts ‒‒‒‒‒‒ A 44 H 45 0 56 V 49 C 37 j 50 q 55 x 53 # 64 B 79 I 38 P 53 W 46 d 55 k 51 r 53 y 54 30 C 60 J 49 Q 41 X 48 e 63 1 36 s 61 z 39 36 > D 56 K 51 R 58 Y 54 f 58 m 32 t 57 ! 36 <38 E 46 L 36 S 65 Z 52 g 40 n 58 u 37 & 65 > 38 Table 4-1 F 50 M 48 T 36 a 63 h 31 o 50 v 33 *65 ? 45 G 65 N 55 U 23 b 55 1 35 p 55 w 59 $ 65 @65
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage