1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267 |
- <!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
- width: 45em;
- border: 1px solid #ddd;
- outline: 1300px solid #fff;
- margin: 16px auto;
- }
-
- body .markdown-body
- {
- padding: 30px;
- }
-
- @font-face {
- font-family: octicons-anchor;
- src: url(data:font/woff;charset=utf-8;base64,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) format('woff');
- }
-
- .markdown-body {
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
- color: #333;
- overflow: hidden;
- font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
- font-size: 16px;
- line-height: 1.6;
- word-wrap: break-word;
- }
-
- .markdown-body a {
- background: transparent;
- }
-
- .markdown-body a:active,
- .markdown-body a:hover {
- outline: 0;
- }
-
- .markdown-body strong {
- font-weight: bold;
- }
-
- .markdown-body h1 {
- font-size: 2em;
- margin: 0.67em 0;
- }
-
- .markdown-body img {
- border: 0;
- }
-
- .markdown-body hr {
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- height: 0;
- }
-
- .markdown-body pre {
- overflow: auto;
- }
-
- .markdown-body code,
- .markdown-body kbd,
- .markdown-body pre {
- font-family: monospace, monospace;
- font-size: 1em;
- }
-
- .markdown-body input {
- color: inherit;
- font: inherit;
- margin: 0;
- }
-
- .markdown-body html input[disabled] {
- cursor: default;
- }
-
- .markdown-body input {
- line-height: normal;
- }
-
- .markdown-body input[type="checkbox"] {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0;
- }
-
- .markdown-body table {
- border-collapse: collapse;
- border-spacing: 0;
- }
-
- .markdown-body td,
- .markdown-body th {
- padding: 0;
- }
-
- .markdown-body * {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
-
- .markdown-body input {
- font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
- }
-
- .markdown-body a {
- color: #4183c4;
- text-decoration: none;
- }
-
- .markdown-body a:hover,
- .markdown-body a:focus,
- .markdown-body a:active {
- text-decoration: underline;
- }
-
- .markdown-body hr {
- height: 0;
- margin: 15px 0;
- overflow: hidden;
- background: transparent;
- border: 0;
- border-bottom: 1px solid #ddd;
- }
-
- .markdown-body hr:before {
- display: table;
- content: "";
- }
-
- .markdown-body hr:after {
- display: table;
- clear: both;
- content: "";
- }
-
- .markdown-body h1,
- .markdown-body h2,
- .markdown-body h3,
- .markdown-body h4,
- .markdown-body h5,
- .markdown-body h6 {
- margin-top: 15px;
- margin-bottom: 15px;
- line-height: 1.1;
- }
-
- .markdown-body h1 {
- font-size: 30px;
- }
-
- .markdown-body h2 {
- font-size: 21px;
- }
-
- .markdown-body h3 {
- font-size: 16px;
- }
-
- .markdown-body h4 {
- font-size: 14px;
- }
-
- .markdown-body h5 {
- font-size: 12px;
- }
-
- .markdown-body h6 {
- font-size: 11px;
- }
-
- .markdown-body blockquote {
- margin: 0;
- }
-
- .markdown-body ul,
- .markdown-body ol {
- padding: 0;
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .markdown-body ol ol,
- .markdown-body ul ol {
- list-style-type: lower-roman;
- }
-
- .markdown-body ul ul ol,
- .markdown-body ul ol ol,
- .markdown-body ol ul ol,
- .markdown-body ol ol ol {
- list-style-type: lower-alpha;
- }
-
- .markdown-body dd {
- margin-left: 0;
- }
-
- .markdown-body code {
- font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
- }
-
- .markdown-body pre {
- margin-top: 0;
- margin-bottom: 0;
- font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
- }
-
- .markdown-body .octicon {
- font: normal normal 16px octicons-anchor;
- line-height: 1;
- display: inline-block;
- text-decoration: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
-
- .markdown-body .octicon-link:before {
- content: '\f05c';
- }
-
- .markdown-body>*:first-child {
- margin-top: 0 !important;
- }
-
- .markdown-body>*:last-child {
- margin-bottom: 0 !important;
- }
-
- .markdown-body .anchor {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- display: block;
- padding-right: 6px;
- padding-left: 30px;
- margin-left: -30px;
- }
-
- .markdown-body .anchor:focus {
- outline: none;
- }
-
- .markdown-body h1,
- .markdown-body h2,
- .markdown-body h3,
- .markdown-body h4,
- .markdown-body h5,
- .markdown-body h6 {
- position: relative;
- margin-top: 1em;
- margin-bottom: 16px;
- font-weight: bold;
- line-height: 1.4;
- }
-
- .markdown-body h1 .octicon-link,
- .markdown-body h2 .octicon-link,
- .markdown-body h3 .octicon-link,
- .markdown-body h4 .octicon-link,
- .markdown-body h5 .octicon-link,
- .markdown-body h6 .octicon-link {
- display: none;
- color: #000;
- vertical-align: middle;
- }
-
- .markdown-body h1:hover .anchor,
- .markdown-body h2:hover .anchor,
- .markdown-body h3:hover .anchor,
- .markdown-body h4:hover .anchor,
- .markdown-body h5:hover .anchor,
- .markdown-body h6:hover .anchor {
- padding-left: 8px;
- margin-left: -30px;
- line-height: 1;
- text-decoration: none;
- }
-
- .markdown-body h1:hover .anchor .octicon-link,
- .markdown-body h2:hover .anchor .octicon-link,
- .markdown-body h3:hover .anchor .octicon-link,
- .markdown-body h4:hover .anchor .octicon-link,
- .markdown-body h5:hover .anchor .octicon-link,
- .markdown-body h6:hover .anchor .octicon-link {
- display: inline-block;
- }
-
- .markdown-body h1 {
- padding-bottom: 0.3em;
- font-size: 2.25em;
- line-height: 1.2;
- border-bottom: 1px solid #eee;
- }
-
- .markdown-body h2 {
- padding-bottom: 0.3em;
- font-size: 1.75em;
- line-height: 1.225;
- border-bottom: 1px solid #eee;
- }
-
- .markdown-body h3 {
- font-size: 1.5em;
- line-height: 1.43;
- }
-
- .markdown-body h4 {
- font-size: 1.25em;
- }
-
- .markdown-body h5 {
- font-size: 1em;
- }
-
- .markdown-body h6 {
- font-size: 1em;
- color: #777;
- }
-
- .markdown-body p,
- .markdown-body blockquote,
- .markdown-body ul,
- .markdown-body ol,
- .markdown-body dl,
- .markdown-body table,
- .markdown-body pre {
- margin-top: 0;
- margin-bottom: 16px;
- }
-
- .markdown-body hr {
- height: 4px;
- padding: 0;
- margin: 16px 0;
- background-color: #e7e7e7;
- border: 0 none;
- }
-
- .markdown-body ul,
- .markdown-body ol {
- padding-left: 2em;
- }
-
- .markdown-body ul ul,
- .markdown-body ul ol,
- .markdown-body ol ol,
- .markdown-body ol ul {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .markdown-body li>p {
- margin-top: 16px;
- }
-
- .markdown-body dl {
- padding: 0;
- }
-
- .markdown-body dl dt {
- padding: 0;
- margin-top: 16px;
- font-size: 1em;
- font-style: italic;
- font-weight: bold;
- }
-
- .markdown-body dl dd {
- padding: 0 16px;
- margin-bottom: 16px;
- }
-
- .markdown-body blockquote {
- padding: 0 15px;
- color: #777;
- border-left: 4px solid #ddd;
- }
-
- .markdown-body blockquote>:first-child {
- margin-top: 0;
- }
-
- .markdown-body blockquote>:last-child {
- margin-bottom: 0;
- }
-
- .markdown-body table {
- display: block;
- width: 100%;
- overflow: auto;
- word-break: normal;
- word-break: keep-all;
- }
-
- .markdown-body table th {
- font-weight: bold;
- }
-
- .markdown-body table th,
- .markdown-body table td {
- padding: 6px 13px;
- border: 1px solid #ddd;
- }
-
- .markdown-body table tr {
- background-color: #fff;
- border-top: 1px solid #ccc;
- }
-
- .markdown-body table tr:nth-child(2n) {
- background-color: #f8f8f8;
- }
-
- .markdown-body img {
- max-width: 100%;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
-
- .markdown-body code {
- padding: 0;
- padding-top: 0.2em;
- padding-bottom: 0.2em;
- margin: 0;
- font-size: 85%;
- background-color: rgba(0,0,0,0.04);
- border-radius: 3px;
- }
-
- .markdown-body code:before,
- .markdown-body code:after {
- letter-spacing: -0.2em;
- content: "\00a0";
- }
-
- .markdown-body pre>code {
- padding: 0;
- margin: 0;
- font-size: 100%;
- word-break: normal;
- white-space: pre;
- background: transparent;
- border: 0;
- }
-
- .markdown-body .highlight {
- margin-bottom: 16px;
- }
-
- .markdown-body .highlight pre,
- .markdown-body pre {
- padding: 16px;
- overflow: auto;
- font-size: 85%;
- line-height: 1.45;
- background-color: #f7f7f7;
- border-radius: 3px;
- }
-
- .markdown-body .highlight pre {
- margin-bottom: 0;
- word-break: normal;
- }
-
- .markdown-body pre {
- word-wrap: normal;
- }
-
- .markdown-body pre code {
- display: inline;
- max-width: initial;
- padding: 0;
- margin: 0;
- overflow: initial;
- line-height: inherit;
- word-wrap: normal;
- background-color: transparent;
- border: 0;
- }
-
- .markdown-body pre code:before,
- .markdown-body pre code:after {
- content: normal;
- }
-
- .markdown-body .highlight {
- background: #fff;
- }
-
- .markdown-body .highlight .h {
- color: #333;
- font-style: normal;
- font-weight: normal;
- }
-
- .markdown-body .highlight .mf,
- .markdown-body .highlight .mh,
- .markdown-body .highlight .mi,
- .markdown-body .highlight .mo,
- .markdown-body .highlight .il,
- .markdown-body .highlight .m {
- color: #945277;
- }
-
- .markdown-body .highlight .s,
- .markdown-body .highlight .sb,
- .markdown-body .highlight .sc,
- .markdown-body .highlight .sd,
- .markdown-body .highlight .s2,
- .markdown-body .highlight .se,
- .markdown-body .highlight .sh,
- .markdown-body .highlight .si,
- .markdown-body .highlight .sx,
- .markdown-body .highlight .s1 {
- color: #df5000;
- }
-
- .markdown-body .highlight .kc,
- .markdown-body .highlight .kd,
- .markdown-body .highlight .kn,
- .markdown-body .highlight .kp,
- .markdown-body .highlight .kr,
- .markdown-body .highlight .kt,
- .markdown-body .highlight .k,
- .markdown-body .highlight .o {
- font-weight: bold;
- }
-
- .markdown-body .highlight .kt {
- color: #458;
- }
-
- .markdown-body .highlight .c,
- .markdown-body .highlight .cm,
- .markdown-body .highlight .c1 {
- color: #998;
- font-style: italic;
- }
-
- .markdown-body .highlight .cp,
- .markdown-body .highlight .cs,
- .markdown-body .highlight .cp .h {
- color: #999;
- font-weight: bold;
- }
-
- .markdown-body .highlight .cs {
- font-style: italic;
- }
-
- .markdown-body .highlight .n {
- color: #333;
- }
-
- .markdown-body .highlight .na,
- .markdown-body .highlight .nv,
- .markdown-body .highlight .vc,
- .markdown-body .highlight .vg,
- .markdown-body .highlight .vi {
- color: #008080;
- }
-
- .markdown-body .highlight .nb {
- color: #0086B3;
- }
-
- .markdown-body .highlight .nc {
- color: #458;
- font-weight: bold;
- }
-
- .markdown-body .highlight .no {
- color: #094e99;
- }
-
- .markdown-body .highlight .ni {
- color: #800080;
- }
-
- .markdown-body .highlight .ne {
- color: #990000;
- font-weight: bold;
- }
-
- .markdown-body .highlight .nf {
- color: #945277;
- font-weight: bold;
- }
-
- .markdown-body .highlight .nn {
- color: #555;
- }
-
- .markdown-body .highlight .nt {
- color: #000080;
- }
-
- .markdown-body .highlight .err {
- color: #a61717;
- background-color: #e3d2d2;
- }
-
- .markdown-body .highlight .gd {
- color: #000;
- background-color: #fdd;
- }
-
- .markdown-body .highlight .gd .x {
- color: #000;
- background-color: #faa;
- }
-
- .markdown-body .highlight .ge {
- font-style: italic;
- }
-
- .markdown-body .highlight .gr {
- color: #aa0000;
- }
-
- .markdown-body .highlight .gh {
- color: #999;
- }
-
- .markdown-body .highlight .gi {
- color: #000;
- background-color: #dfd;
- }
-
- .markdown-body .highlight .gi .x {
- color: #000;
- background-color: #afa;
- }
-
- .markdown-body .highlight .go {
- color: #888;
- }
-
- .markdown-body .highlight .gp {
- color: #555;
- }
-
- .markdown-body .highlight .gs {
- font-weight: bold;
- }
-
- .markdown-body .highlight .gu {
- color: #800080;
- font-weight: bold;
- }
-
- .markdown-body .highlight .gt {
- color: #aa0000;
- }
-
- .markdown-body .highlight .ow {
- font-weight: bold;
- }
-
- .markdown-body .highlight .w {
- color: #bbb;
- }
-
- .markdown-body .highlight .sr {
- color: #017936;
- }
-
- .markdown-body .highlight .ss {
- color: #8b467f;
- }
-
- .markdown-body .highlight .bp {
- color: #999;
- }
-
- .markdown-body .highlight .gc {
- color: #999;
- background-color: #EAF2F5;
- }
-
- .markdown-body kbd {
- background-color: #e7e7e7;
- background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
- background-image: linear-gradient(#fefefe, #e7e7e7);
- background-repeat: repeat-x;
- display: inline-block;
- padding: 3px 5px;
- font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
- line-height: 10px;
- color: #000;
- border: 1px solid #cfcfcf;
- border-radius: 2px;
- }
-
- .markdown-body .highlight .pl-coc,
- .markdown-body .highlight .pl-entm,
- .markdown-body .highlight .pl-eoa,
- .markdown-body .highlight .pl-mai .pl-sf,
- .markdown-body .highlight .pl-pdv,
- .markdown-body .highlight .pl-sc,
- .markdown-body .highlight .pl-sr,
- .markdown-body .highlight .pl-v,
- .markdown-body .highlight .pl-vpf {
- color: #0086b3;
- }
-
- .markdown-body .highlight .pl-eoac,
- .markdown-body .highlight .pl-mdht,
- .markdown-body .highlight .pl-mi1,
- .markdown-body .highlight .pl-mri,
- .markdown-body .highlight .pl-va,
- .markdown-body .highlight .pl-vpu {
- color: #008080;
- }
-
- .markdown-body .highlight .pl-c,
- .markdown-body .highlight .pl-pdc {
- color: #b4b7b4;
- font-style: italic;
- }
-
- .markdown-body .highlight .pl-k,
- .markdown-body .highlight .pl-ko,
- .markdown-body .highlight .pl-kolp,
- .markdown-body .highlight .pl-mc,
- .markdown-body .highlight .pl-mr,
- .markdown-body .highlight .pl-ms,
- .markdown-body .highlight .pl-s,
- .markdown-body .highlight .pl-sok,
- .markdown-body .highlight .pl-st {
- color: #6e5494;
- }
-
- .markdown-body .highlight .pl-ef,
- .markdown-body .highlight .pl-enf,
- .markdown-body .highlight .pl-enm,
- .markdown-body .highlight .pl-entc,
- .markdown-body .highlight .pl-eoi,
- .markdown-body .highlight .pl-sf,
- .markdown-body .highlight .pl-smc {
- color: #d12089;
- }
-
- .markdown-body .highlight .pl-ens,
- .markdown-body .highlight .pl-eoai,
- .markdown-body .highlight .pl-kos,
- .markdown-body .highlight .pl-mh .pl-pdh,
- .markdown-body .highlight .pl-mp,
- .markdown-body .highlight .pl-pde,
- .markdown-body .highlight .pl-stp {
- color: #458;
- }
-
- .markdown-body .highlight .pl-enti {
- color: #d12089;
- font-weight: bold;
- }
-
- .markdown-body .highlight .pl-cce,
- .markdown-body .highlight .pl-enc,
- .markdown-body .highlight .pl-kou,
- .markdown-body .highlight .pl-mq {
- color: #f93;
- }
-
- .markdown-body .highlight .pl-mp1 .pl-sf {
- color: #458;
- font-weight: bold;
- }
-
- .markdown-body .highlight .pl-cos,
- .markdown-body .highlight .pl-ent,
- .markdown-body .highlight .pl-md,
- .markdown-body .highlight .pl-mdhf,
- .markdown-body .highlight .pl-ml,
- .markdown-body .highlight .pl-pdc1,
- .markdown-body .highlight .pl-pds,
- .markdown-body .highlight .pl-s1,
- .markdown-body .highlight .pl-scp,
- .markdown-body .highlight .pl-sol {
- color: #df5000;
- }
-
- .markdown-body .highlight .pl-c1,
- .markdown-body .highlight .pl-cn,
- .markdown-body .highlight .pl-pse,
- .markdown-body .highlight .pl-pse .pl-s2,
- .markdown-body .highlight .pl-vi {
- color: #a31515;
- }
-
- .markdown-body .highlight .pl-mb,
- .markdown-body .highlight .pl-pdb {
- color: #df5000;
- font-weight: bold;
- }
-
- .markdown-body .highlight .pl-mi,
- .markdown-body .highlight .pl-pdi {
- color: #6e5494;
- font-style: italic;
- }
-
- .markdown-body .highlight .pl-ms1 {
- background-color: #f5f5f5;
- }
-
- .markdown-body .highlight .pl-mdh,
- .markdown-body .highlight .pl-mdi {
- font-weight: bold;
- }
-
- .markdown-body .highlight .pl-mdr {
- color: #0086b3;
- font-weight: bold;
- }
-
- .markdown-body .highlight .pl-s2 {
- color: #333;
- }
-
- .markdown-body .highlight .pl-ii {
- background-color: #df5000;
- color: #fff;
- }
-
- .markdown-body .highlight .pl-ib {
- background-color: #f93;
- }
-
- .markdown-body .highlight .pl-id {
- background-color: #a31515;
- color: #fff;
- }
-
- .markdown-body .highlight .pl-iu {
- background-color: #b4b7b4;
- }
-
- .markdown-body .highlight .pl-mo {
- color: #969896;
- }
-
- .markdown-body .task-list-item {
- list-style-type: none;
- }
-
- .markdown-body .task-list-item+.task-list-item {
- margin-top: 3px;
- }
-
- .markdown-body .task-list-item input {
- float: left;
- margin: 0.3em 0 0.25em -1.6em;
- vertical-align: middle;
- }</style><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <script>
- MathJax.Hub.Config({
- config: ["MMLorHTML.js"],
- extensions: ["tex2jax.js"],
- jax: ["input/TeX"],
- tex2jax: {
- inlineMath: [ ['$','$'], ["\\(","\\)"] ],
- displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
- processEscapes: false
- },
- TeX: {
- extensions: ["AMSmath.js", "AMSsymbols.js"],
- TagSide: "right",
- TagIndent: ".8em",
- MultLineWidth: "85%",
- equationNumbers: {
- autoNumber: "AMS",
- },
- unicode: {
- fonts: "STIXGeneral,'Arial Unicode MS'"
- }
- },
- showProcessingMessages: false
- });
- </script>
- <title>classesBasket</title></head><body><article class="markdown-body"><p><a href="#markdown-header-classes-basket">English</a> | <a href="#markdown-header-clases-baloncesto">Español</a></p>
-
- <h1>
- <a id="user-content-clases---baloncesto" class="anchor" href="#clases---baloncesto" aria-hidden="true"><span class="octicon octicon-link"></span></a>Clases - Baloncesto</h1>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main1.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main1.png" alt="main1.png" style="max-width:100%;"></a>
- <a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main2.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main2.png" alt="main2.png" style="max-width:100%;"></a>
- <a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main3.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main3.png" alt="main3.png" style="max-width:100%;"></a></p>
-
- <p>La <em>programación orientada a objetos</em> (object oriented programming, OOP) es un paradigma de programación que promueve el diseño de programas en el que distintos objetos interactúan entre sí para resolver un problema. C++ es uno de los lenguajes de programación que promueve la programación orientada a objetos, permitiendo que los programadores creen sus propias clases desde cero o derivadas de otras clases existentes. Algunos otros lenguajes que promueven OOP son Java, Python, javascript y PHP. </p>
-
- <p>En OOP, cada objeto encapsula dentro de él ciertas propiedades sobre el ente que está modelando (por ejemplo, un objeto que modela un <em>punto</em> encapsula dentro de sí las coordenadas <em>x</em> y <em>y</em> del punto que representa). Además, cada objeto permite realizar ciertas acciones sobre sí, i.e. contiene sus <em>métodos</em>. Por ejemplo, un objeto de clase <em>punto</em> puede realizar la acción de cambiar el valor de su coordenada <em>x</em>. </p>
-
- <p>Cuando la clase de objetos que necesitamos utilizar en nuestro programa no ha sido predefinida en el alguna librería, necesitamos declarar e implementar nuestra propia clase. Para esto definimos <em>clases</em> que contengan datos con ciertas <em>propiedades</em> o <em>atributos</em> y acciones que queremos hacer con esos datos por medio de <em>métodos</em> o <em>funciones miembro</em>. De esta manera, podremos organizar la información y procesos en <em>objetos</em> que tienen las propiedades y métodos de una clase. En la experiencia de laboratorio de hoy practicarás el definir una clase e implementar algunos de sus métodos completando un programa que simula un partido de baloncesto entre dos jugadores, mantiene la puntuación del juego y las estadísticas globales de los dos jugadores.</p>
-
- <h2>
- <a id="user-content-objetivos" class="anchor" href="#objetivos" aria-hidden="true"><span class="octicon octicon-link"></span></a>Objetivos:</h2>
-
- <ol>
- <li><p>Diseñar y definir una clase.</p></li>
- <li><p>Implementar métodos de una clase.</p></li>
- </ol>
-
- <h2>
- <a id="user-content-pre-lab" class="anchor" href="#pre-lab" aria-hidden="true"><span class="octicon octicon-link"></span></a>Pre-Lab:</h2>
-
- <p>Antes de llegar al laboratorio debes haber:</p>
-
- <ol>
- <li><p>Repasado los conceptos relacionados a clases y objetos.</p></li>
- <li><p>Estudiado el esqueleto del programa en <code>main.cpp</code>.</p></li>
- <li><p>Estudiado los conceptos e instrucciones para la sesión de laboratorio.</p></li>
- <li><p>Tomado el quiz Pre-Lab que se encuentra en Moodle.</p></li>
- </ol>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-el-juego" class="anchor" href="#el-juego" aria-hidden="true"><span class="octicon octicon-link"></span></a>El juego</h2>
-
- <p>El esqueleto de programa que te proveemos simula un partido de baloncesto entre dos jugadores. Todos los tiros anotados reciben dos puntos. Se inicializan los datos con el nombre de cada jugador y sus estadísticas globales en el "torneo": total de juegos jugados, tiros intentados, tiros anotados y rebotes. El programa incluye funciones aleatorias y fórmulas para determinar el jugador que intenta el tiro, si anota el tiro y el jugador que coge el rebote. Durante el partido simulado se mantiene la puntuación de cada jugador y se actualizan los datos para cada jugador. Al final del partido se despliega una tabla con las estadísticas.</p>
-
- <hr>
-
- <h3>
- <a id="user-content-la-clase-bbplayer" class="anchor" href="#la-clase-bbplayer" aria-hidden="true"><span class="octicon octicon-link"></span></a>La clase <code>BBPlayer</code>
- </h3>
-
- <p>Para esta experiencia de laboratorio, definirás una clase <code>BBPlayer</code> que contenga los atributos y métodos que se describen abajo. Como algunas de las funciones que ya están definidas en el código provisto utilizan atributos y métodos de esta clase, es importante que utilices los mismos nombres que te indicamos. El código comentado en la función <code>main</code> y en <code>test_BBPlayer</code> también te ayudará a determinar el tipo de dato que debe devolver el método y los tipos que deben tener los parámetros y el orden en que se incluyen en la declaración de la función.</p>
-
- <h4>
- <a id="user-content-atributos" class="anchor" href="#atributos" aria-hidden="true"><span class="octicon octicon-link"></span></a>Atributos</h4>
-
- <ul>
- <li> <code>_name</code>: guardará el nombre del jugador</li>
- <li> <code>_shotsTaken</code>: guardará el número de tiros al canasto intentados durante el torneo</li>
- <li> <code>_shotsMade</code>: guardará el número de tiros al canasto anotados durante el torneo</li>
- <li> <code>_gamesPlayed</code>: guardará el número de juegos jugados durante el torneo</li>
- <li> <code>_rebounds</code>: guardará el número de rebotes durante el torneo</li>
- <li> <code>_score</code>: guardará la puntuación del jugador durante el partido</li>
- </ul>
-
- <h4>
- <a id="user-content-métodos" class="anchor" href="#m%C3%A9todos" aria-hidden="true"><span class="octicon octicon-link"></span></a>Métodos</h4>
-
- <ul>
- <li>constructor por defecto (default). <em>(método incluido en <code>main.cpp</code>)</em>
- </li>
- <li>
- <code>setAll()</code>: método que asignará valor inicial a todos los atributos de un objeto. Nota que este método está invocado al comienzo de <code>main</code> para asignarle valores iniciales al arreglo <code>P</code> que es un arreglo de dos objetos de la clase <code>BBPlayer</code>.</li>
- <li>
- <code>name()</code>: método para adquirir el nombre del jugador.</li>
- <li>
- <code>shotPercentage()</code>: método para calcular el porciento de tiros anotados; se usa para "determinar" si el tiro intentado por un jugador se anota. <em>(método incluido en <code>main.cpp</code>)</em>
- </li>
- <li>
- <code>reboundsPerGame()</code>: método para calcular el promedio de rebotes cogidos por juego; se usa para "determinar" si un jugador coge un rebote. <em>(método incluido en <code>main.cpp</code>)</em>
- </li>
- <li>
- <code>shotMade()</code>: método que registra que se anotó un tiro, que se intentó un tiro, y actualiza la puntuación del jugador.</li>
- <li>
- <code>shotMissed()</code>: método que registra tiro intentado (pero fallado).</li>
- <li>
- <code>reboundMade()</code>: método que registra un rebote cogido.</li>
- <li>
- <code>addGame()</code>: método que registra que se jugó un partido.</li>
- <li>
- <code>score()</code>: método para adquirir la puntuación del jugador.</li>
- <li>
- <code>printStats()</code>: método para desplegar las estádisticas del jugador. <em>(método incluido en <code>main.cpp</code>)</em>
- </li>
- </ul>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-sesión-de-laboratorio" class="anchor" href="#sesi%C3%B3n-de-laboratorio" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sesión de laboratorio:</h2>
-
- <p>Tu tarea durante la sesión de laboratorio será el definir la clase <code>BBPlayer</code> con los atributos y prototipos de los métodos que se listan arriba. El esqueleto del programa incluye el código para definir algunos de los métodos; otros tendrán que ser definidos.</p>
-
- <p>El esqueleto del programa también incluye la función <code>test_BBPlayer</code> que hace pruebas unitarias a cada una de las funciones del programa. Las pruebas están comentadas y, según vayas definiendo las funciones, las vas descomentando, probando y modificando la función hasta que la prueba para esa función se pase. Una vez todas las funciones estén listas y hayan pasado las pruebas, se prueba el programa completo removiendo los comentarios que sean necesarios en el código de la función <code>main</code>.</p>
-
- <h3>
- <a id="user-content-ejercicio-0-bajar-y-entender-el-código-provisto" class="anchor" href="#ejercicio-0-bajar-y-entender-el-c%C3%B3digo-provisto" aria-hidden="true"><span class="octicon octicon-link"></span></a>Ejercicio 0: Bajar y entender el código provisto</h3>
-
- <h4>
- <a id="user-content-instrucciones" class="anchor" href="#instrucciones" aria-hidden="true"><span class="octicon octicon-link"></span></a>Instrucciones</h4>
-
- <ol>
- <li><p>Carga a QtCreator el proyecto <code>basket01</code> haciendo doble "click" en el archivo <code>basket01.pro</code> en el directorio <code>Documents/eip/Classes-Basket</code> de tu computadora. También puedes ir a <code>http://bitbucket.org/eip-uprrp/classes-basket</code> para descargar la carpeta <code>Classes-Basket</code> a tu computadora.</p></li>
- <li><p>Este programa correrá en el terminal y debes seleccionar esa opción desde la ventana de "Projects". Para acceder a esta ventana, seleccionas "Projects" en el menú vertical de la izquierda. Luego en <code>Build & Run</code> seleccionas <code>Run</code> y luego marcas la caja que dice <code>Run in terminal</code>.</p></li>
- <li><p>Estudia y entiende el código en el archivo <code>main.cpp</code>, incluyendo el código que está comentado.</p></li>
- </ol>
-
- <h3>
- <a id="user-content-ejercicio-1-definir-la-clase-bbplayer" class="anchor" href="#ejercicio-1-definir-la-clase-bbplayer" aria-hidden="true"><span class="octicon octicon-link"></span></a>Ejercicio 1: Definir la clase <code>BBPlayer</code>
- </h3>
-
- <ol>
- <li>
- <p>Define la clase <code>BBPlayer</code> con las especificaciones que se incluyen arriba. Para cada uno de los métodos que se especifican arriba:</p>
-
- <p>a. Incluye el prototipo del método en la definición de la clase</p>
-
- <p>b. Si la función correspondiente a ese método ya está codificada en el programa, remueve los comentarios de las secciones correspondientes a esa función en <code>test_BBPlayer</code>.</p>
-
- <p>c. Si la función correspondiente a ese método no está codificada, define la función y luego remueve los comentarios de las secciones correspondientes a esa función en <code>test_BBPlayer</code>.</p>
-
- <p>d. Corre el programa y verifica que haya pasado las pruebas. Debes obtener una ventana similar a la de la Figura 1. Si no pasa las pruebas, revisa tu código. Repite hasta que tu código haya pasado las pruebas. </p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure1.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure1.png" alt="figure1.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figura 1.</strong> Ejemplo de la pantalla que debes obtener si el código pasa las pruebas unitarias.</p>
-
- <hr>
- </li>
- <li>
- <p>Una vez tengas todas las funciones definidas y probadas, descomenta el código de la función <code>main</code> para probar el programa completo. Si el programa funciona correctamente, debes obtener una ventana que comienza de manera similar a la Figura 2 y termina como en la Figura 3.</p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure2.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure2.png" alt="figure2.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figura 2.</strong> Ejemplo del comienzo de la pantalla que debes obtener si el programa funciona correctamente.</p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure3.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure3.png" alt="figure3.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figura 3.</strong> Ejemplo de la pantalla que debes obtener al final del programa si éste funciona correctamente.</p>
-
- <hr>
- </li>
- </ol>
-
- <p><strong>IMPORTANTE:</strong> NO debes hacer ningún cambio en las funciones <code>main</code> y <code>test_BBPlayer</code>, aparte de quitar los comentarios.</p>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-entrega" class="anchor" href="#entrega" aria-hidden="true"><span class="octicon octicon-link"></span></a>Entrega</h2>
-
- <p>Utiliza "Entrega" en Moodle para entregar el archivo <code>main.cpp</code>. Recuerda utilizar buenas prácticas de programación, incluir el nombre de los programadores y documentar tu programa.</p>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-referencias" class="anchor" href="#referencias" aria-hidden="true"><span class="octicon octicon-link"></span></a>Referencias</h2>
-
- <p>[1] <a href="http://www.telegraph.co.uk/sport/olympics/basketball/9348826/London-2012-Olympics-Temi-Fagbenle-in-Team-GB-womens-basketball-squad.html">http://www.telegraph.co.uk/sport/olympics/basketball/9348826/London-2012-Olympics-Temi-Fagbenle-in-Team-GB-womens-basketball-squad.html</a></p>
-
- <p>[2] <a href="http://www.musthavemenus.com/category/bar-clipart.html">http://www.musthavemenus.com/category/bar-clipart.html</a></p>
-
- <p>[3] <a href="http://basketball.isport.com/basketball-guides/finding-your-niche-in-basketball">http://basketball.isport.com/basketball-guides/finding-your-niche-in-basketball</a></p>
-
- <hr>
-
- <hr>
-
- <hr>
-
- <p><a href="#markdown-header-classes-basket">English</a> | <a href="#markdown-header-clases-baloncesto">Español</a></p>
-
- <h1>
- <a id="user-content-classes---basketball" class="anchor" href="#classes---basketball" aria-hidden="true"><span class="octicon octicon-link"></span></a>Classes - Basketball</h1>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main1.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main1.png" alt="main1.png" style="max-width:100%;"></a>
- <a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main2.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main2.png" alt="main2.png" style="max-width:100%;"></a>
- <a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main3.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/main3.png" alt="main3.png" style="max-width:100%;"></a></p>
-
- <p><em>Object Oriented Programming</em> (OOP) is a programming paradigm that promotes the design of programs by having different objects interacting together to solve a problem. C++ is one of the programming languages that promotes object oriented programming, allowing programmers to create their own classes from scratch or derive them from other existing classes. Other languages that promote OOP are Java, Python, Javascript and PHP.</p>
-
- <p>In OOP, each object encapsulates within itself certain properties about the entity being modeled (for example, an object that models a <em>point</em> encapsulates the coordinates <em>x</em> and <em>y</em> of the point being represented). Furthermore, each object allows certain actions to be carried out on itself with the <em>methods</em> that the object contains. For example, an object of class <em>point</em> could carry out the action of changing the value of the <em>x</em> coordinate.</p>
-
- <p>When an object class we need to use in our program has not been predefined in a library, we need to declare and implement our own class. To do this, we define <em>classes</em> that contain data with certain <em>properties</em> or <em>attributes</em> and actions that we want to carry out with this data through the use of <em>methods</em> or <em>member functions</em>. This way, we can organize the information and processes in <em>objects</em> that have the properties and methods of a class. In today's laboratory experience you will practice defining a class and implementing some of its methods by completing a program that simulates a basketball game between two players, maintaining the score for the game and the global statistics for the two players.</p>
-
- <h2>
- <a id="user-content-objectives" class="anchor" href="#objectives" aria-hidden="true"><span class="octicon octicon-link"></span></a>Objectives:</h2>
-
- <ol>
- <li><p>Design and define a class.</p></li>
- <li><p>Implement methods for a class.</p></li>
- </ol>
-
- <h2>
- <a id="user-content-pre-lab-1" class="anchor" href="#pre-lab-1" aria-hidden="true"><span class="octicon octicon-link"></span></a>Pre-Lab:</h2>
-
- <p>Before coming to the laboratory you should have:</p>
-
- <ol>
- <li><p>Reviewed the concepts related to classes and objects.</p></li>
- <li><p>Studied the skeleton for the program in <code>main.cpp</code>.</p></li>
- <li><p>Studied the concepts and instructions for the laboratory session.</p></li>
- <li><p>Taken the Pre-Lab quiz that can be found in Moodle.</p></li>
- </ol>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-the-game" class="anchor" href="#the-game" aria-hidden="true"><span class="octicon octicon-link"></span></a>The Game</h2>
-
- <p>The skeleton for the program that we provide simulates a basketball game between two players. The successful throws into the basket receive two points. The data is initiated with the name of each player and the global statistics in the "tournament": total of games played, attempted throws, successful throws and rebounds. The program includes random functions and formulas to determine the player that attempts a throw, if the player scores, and the player that takes the rebound. During the simulated game the score for each player is kept and each player's data is updated. At the end of the game, a table with the statistics is displayed.</p>
-
- <hr>
-
- <h3>
- <a id="user-content-the-bbplayer-class" class="anchor" href="#the-bbplayer-class" aria-hidden="true"><span class="octicon octicon-link"></span></a>The <code>BBPlayer</code> Class</h3>
-
- <p>For this laboratory experience, you will define the <code>BBPlayer</code> class that contains the attributes and methods that are described below. Since some of the functions that are already defined in the provided code use attributes and methods of this class, it is important that you use the same names that we indicate. The commented code in the <code>main</code> function and in <code>test_BBPlayer</code> will help you determine the type of data the method should return, the types the parameters should have, and the order in which they are included in the function declaration.</p>
-
- <h4>
- <a id="user-content-attributes" class="anchor" href="#attributes" aria-hidden="true"><span class="octicon octicon-link"></span></a>Attributes</h4>
-
- <ul>
- <li>
- <code>_name</code>: stores the name of the player</li>
- <li>
- <code>_shotsTaken</code>: stores the number of attempted throws during the tournament</li>
- <li>
- <code>_showsMade</code>: stores the number of throws scored during the tournament</li>
- <li>
- <code>_gamesPlayed</code>: stores the number of games played during the tournament</li>
- <li>
- <code>_rebounds</code>: stores the number of rebounds during the tournament</li>
- <li>
- <code>_score</code>: stores the player's score during the game</li>
- </ul>
-
- <h4>
- <a id="user-content-methods" class="anchor" href="#methods" aria-hidden="true"><span class="octicon octicon-link"></span></a>Methods</h4>
-
- <ul>
- <li>default constructor. <em>(method included in <code>main.cpp</code>)</em>
- </li>
- <li>
- <code>setAll()</code>: methods that assigns an initial value to all of the attributes of the object. Notice that this method is invoked at the beginning of <code>main</code> to assign initial values to the array <code>P</code> that is an array of two objects of the <code>BBPlayer</code> class.</li>
- <li>
- <code>name()</code>: method to acquire the name of the player.</li>
- <li>
- <code>shotPercentage()</code>: method to compute the percent of throws scored; is used to determine if the attempted throw is scored by a player. <em>(method included in <code>main.cpp</code>)</em>
- </li>
- <li>
- <code>reboundsPerGame()</code>: method to compute the average number of rebounds caught by a player; is used to determine if the player successfully catches the rebound. <em>(method included in <code>main.cpp</code>)</em>
- </li>
- <li>'shotMade()': method that registers that a shot was scored, that a shot was attempted, and updates the score for the player.</li>
- <li>
- <code>shotMissed()</code>: method that registers an attempted throw (but unsuccessful).</li>
- <li>
- <code>reboundMade()</code>: method that registers that a rebound was caught.</li>
- <li>
- <code>addGame()</code>: method that registers that a game was played.</li>
- <li>
- <code>score()</code>: method to acquire the score of a player.</li>
- <li>
- <code>printStats()</code>: method that displays a player's statistics. <em>(method included in <code>main.cpp</code>)</em>
- </li>
- </ul>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-laboratory-session" class="anchor" href="#laboratory-session" aria-hidden="true"><span class="octicon octicon-link"></span></a>Laboratory Session:</h2>
-
- <p>During this laboratory session, your task will be to define the <code>BBPlayer</code> class with the attributes and method prototypes listed above. The skeleton for the program includes the code to define some of the methods; others will have to be defined.</p>
-
- <p>The skeleton for the program also includes the <code>test_BBPlayer</code> function that does unit tests to each of the functions in the program. The tests are commented and, as you define each function, you will remove the comment, test and modify the function, until the test for that function is passed. Once all of the functions are ready and have passed the tests, the whole program is tested by removing the necessary comments in the <code>main</code> function.</p>
-
- <h3>
- <a id="user-content-exercise-0-download-and-understand-the-provided-code" class="anchor" href="#exercise-0-download-and-understand-the-provided-code" aria-hidden="true"><span class="octicon octicon-link"></span></a>Exercise 0: Download and understand the provided code</h3>
-
- <h4>
- <a id="user-content-instructions" class="anchor" href="#instructions" aria-hidden="true"><span class="octicon octicon-link"></span></a>Instructions</h4>
-
- <ol>
- <li><p>Load the <code>basket01</code> project onto Qt by double clicking on the <code>basket01.pro</code> filein the directory <code>Documents/eip/Classes-Basket</code> of your computer. You may also go to <code>http://bitbucket.org/eip-uprrp/classes-basket</code> to download the <code>Classes-Basket</code> folder to your computer.</p></li>
- <li><p>This program will run on the terminal and you should select this option from the "Projects" window. To access this window, you select "Projects" in the vertical menu to the left. Afterwards, in <code>Build & Run</code> you select <code>Run</code> and then mark the box that says <code>Run in terminal</code>.</p></li>
- <li><p>Study and understand the code in the <code>main.cpp</code> file, including the code that is commented.</p></li>
- </ol>
-
- <h3>
- <a id="user-content-exercise-1-define-the-bbplayer-class" class="anchor" href="#exercise-1-define-the-bbplayer-class" aria-hidden="true"><span class="octicon octicon-link"></span></a>Exercise 1: Define the <code>BBPlayer</code> class</h3>
-
- <ol>
- <li>
- <p>Define the <code>BBPlayer</code> class with the specifications included above. For each one of the methods that are specified above:</p>
-
- <p>a. Include a prototype for the method in the class definition.</p>
-
- <p>b. If the corresponding member function is already coded in the program, remove the comments from the corresponding sections for this function in <code>test_BBPlayer</code>.</p>
-
- <p>c. If the corresponding member function is not coded, define the function and then remove the comments from the corresponding sections for this function in <code>test_BBPlayer</code>.</p>
-
- <p>d. Run the program and verify that it passed all of the tests. You should obtain a window similar to the one in Figure 1. If your code does not pass all the tests, revise your code. Repeat until your code has passed all of the tests.</p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure1.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure1.png" alt="figure1.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figure 1.</strong> Example of the window you should obtain if the code passes the unit tests.</p>
-
- <hr>
- </li>
- <li>
- <p>Once you have all of the functions defined and tested, uncomment the code in the <code>main</code> function to test the whole program. If the program functions correctly, you should obtain a window that starts similarly to the one in Figure 2 and finishes like the one in Figure 3.</p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure2.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure2.png" alt="figure2.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figure 2.</strong> Example of the start of the window you should obtain if the program functions correctly.</p>
-
- <hr>
-
- <p><a href="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure3.png" target="_blank"><img src="/Users/Ivelisse/Dropbox/eip/EIP-REVISION-VERANO/Classes/Basket/basket-Edited-WithSolution-Aug-2015/images/figure3.png" alt="figure3.png" style="max-width:100%;"></a></p>
-
- <p><strong>Figure 3.</strong> Example of the window you should obtain at the end of the program if it is working correctly.</p>
-
- <hr>
- </li>
- </ol>
-
- <p><strong>IMPORTANT:</strong> You SHOULD NOT make any changes in the <code>main</code> and <code>test_BBPlayer</code> functions, aside from removing the comments.</p>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-deliverables" class="anchor" href="#deliverables" aria-hidden="true"><span class="octicon octicon-link"></span></a>Deliverables</h2>
-
- <p>Use "Deliverables" in Moodle to hand in the <code>main.cpp</code> file. Remember to use good programming techniques, include the name of the programmers involved, and document your program.</p>
-
- <hr>
-
- <hr>
-
- <h2>
- <a id="user-content-references" class="anchor" href="#references" aria-hidden="true"><span class="octicon octicon-link"></span></a>References</h2>
-
- <p>[1] <a href="http://www.telegraph.co.uk/sport/olympics/basketball/9348826/London-2012-Olympics-Temi-Fagbenle-in-Team-GB-womens-basketball-squad.html">http://www.telegraph.co.uk/sport/olympics/basketball/9348826/London-2012-Olympics-Temi-Fagbenle-in-Team-GB-womens-basketball-squad.html</a></p>
-
- <p>[2] <a href="http://www.musthavemenus.com/category/bar-clipart.html">http://www.musthavemenus.com/category/bar-clipart.html</a></p>
-
- <p>[3] <a href="http://basketball.isport.com/basketball-guides/finding-your-niche-in-basketball">http://basketball.isport.com/basketball-guides/finding-your-niche-in-basketball</a></p>
- </article></body></html>
|