Defined Functions

g=Graphics[{Thick,Green,Rectangle[{0,-1},{2,1}],Red,Disk[],Blue,Circle[{2,0}],Yellow,Polygon[{{2,0},{4,1},{4,-1}}],Purple,Arrowheads[Large],Arrow[{{4,3/2},{0,3/2},{0,0}}],Black,Dashed,Line[{{-1,0},{4,0}}]}];

makeTextTable[data0_]:=Module[{data},
(* FIXME data=Table[ToString[#,TraditionalForm]&/@(data0[[i]]),{i,1,Length[data0]}];*)

Text@Grid[data0,Background->{None,{Lighter[Yellow,.9],{White,Lighter[Blend[{Blue,Green}],.8]}}},Dividers->{{Darker[Gray,.6],{Lighter[Gray,.5]},Darker[Gray,.6]},{Darker[Gray,.6],Darker[Gray,.6],{False},Darker[Gray,.6]}},ItemSize->Automatic]

];

dm=DynamicModule[{y,a,str,str2,str3,str1,str21,str31,b,x,i},Manipulate[
Column[{
Text@Row[{Style["Example 1.2.",Bold,15]}],
Text@Row[{"Plate number: ",x," letters and ",y," digits?"}],
Text@Row[{""}],
a=10;
str=ToString[a]<>StringJoin[Table["×"<>ToString[i],{i,a-1,a-(x-1),-1}]];
str2=Flatten@ToExpression@StringSplit[str,"×"];
str3=Times@@@{str2};

b=26;
str1=ToString[b]<>StringJoin[Table["×"<>ToString[i],{i,b-1,b-(y-1),-1}]];
str21=Flatten@ToExpression@StringSplit[str1,"×"];
str31=Times@@@{str21};

Text@makeTextTable[{

{"Repetition allowed ",Row[{"26"<>StringJoin[Table["×"<>ToString[26],(x-1)]]<>"×10"<>StringJoin[Table["×"<>ToString[10],(y-1)]]," = ",ToString[Power[10,y]*Power[26,x],TraditionalForm]}]},
{"No repetition: ",Row[{ ToString[b]<>StringJoin[Table["×"<>ToString[i],{i,b-1,b-(x-1),-1}]]<>"×"<>
ToString[a]<>StringJoin[Table["×"<>ToString[i],{i,a-1,a-(y-1),-1}]]

,
" = ",ToString[str3[[1]]*str31[[1]] ]}]}

}]
}],
Button[" Again ",x=RandomInteger[{2,5}];y=RandomInteger[{2,5}],ImageSize->80],
{{x,3,"# of letters"},2,5,1,Appearance -> "Labeled"},
{{y,2,"# of digits"},2,5,1,Appearance -> "Labeled"}
,SaveDefinitions->True]];

Creating CDF file

CDFDeploy[ToFileName[{$UserDocumentsDirectory},"ABC_first_file.cdf"],CreateDocument[{

Pane@Text[
Style["Chapter 15",Bold,Italic,25]],
Pane@Text[
Style["Differential Equations",Underlined,20]],
Spacer[100],
Spacer[100],
Pane@Text[
Style["In many natural conditions the rate at which the amount of an object changes is directly proportional to the amount of the object itslef. For example:",20]],
Spacer[100],
Pane@Text[
Style["1) The marginal cost of a product varies directly with the number of units manufactured.",20]],
Pane@Show[g],
Spacer[100],
Pane@Text[
Style["2) the rate at which certain populations increase varies directly with the size of the population, i.e. (dP/dt) = kt where P(t) is the population at time t.",20]],
Spacer[100],
Pane@Text[
Style["2) the rate at which certain populations increase varies directly with the size of the population, i.e. (dP/dt) = kt where P(t) is the population at time t.",20]],
Spacer[100],
Pane@Text[
Style["2) the rate at which certain populations increase varies directly with the size of the population, i.e. (dP/dt) = kt where P(t) is the population at time t.",20]],
Pane@makeTextTable[{{"title1","title 2","tilte 3"},{4,5,6}}],
Pane@dm

}],
"Method"->"Standalone"];