{"id":199,"date":"2022-05-10T20:45:33","date_gmt":"2022-05-10T19:45:33","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/?page_id=199"},"modified":"2022-05-10T20:58:14","modified_gmt":"2022-05-10T19:58:14","slug":"design","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/design\/","title":{"rendered":"Design"},"content":{"rendered":"<p><span data-contrast=\"none\">The design is very important, the programmer needs to work out the details of the program.<\/span>\u00a0<span data-contrast=\"none\">The programmer will consider the user interface and structure of the program.<\/span><\/p>\n<h2 style=\"color: red\">Stepwise Refinements<\/h2>\n<p><span data-contrast=\"none\">This is a method of taking\u00a0<\/span><span data-contrast=\"none\">a large problem and breaking it down into smaller more manageable problems.\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">Stepwise\u00a0<\/span><span data-contrast=\"none\">refinement is also called\u00a0<\/span><b><span data-contrast=\"none\">top down design\u00a0<\/span><\/b><span data-contrast=\"none\">as the process is started as one problem at the top and worked down into smaller problems.\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">Two common notations for program design are\u00a0<\/span><b><span data-contrast=\"none\">pseudocode<\/span><\/b><b><span data-contrast=\"none\">\u00a0<\/span><\/b><span data-contrast=\"none\">and\u00a0<\/span><b><span data-contrast=\"none\">structure diagrams<\/span><\/b><span data-contrast=\"none\">.\u00a0<\/span><\/p>\n<h2 style=\"color: red\"><b><span data-contrast=\"none\">Pseudocode<\/span><\/b><\/h2>\n<p><b><span data-contrast=\"none\">Problem<\/span><\/b><b><span data-contrast=\"none\">:\u00a0<\/span><\/b><b><span data-contrast=\"none\">&#8211;\u00a0<\/span><\/b><span data-contrast=\"none\">A\u00a0<\/span><span data-contrast=\"none\">teacher wishes to calculate the average mark of 3 end-of-topic tests and display the results.\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"none\">Main Algorithm\u00a0<\/span><\/b><\/p>\n<ol>\n<li><span data-contrast=\"none\"> Get input values\u00a0<\/span><\/li>\n<li><span data-contrast=\"none\"> Perform Calculation\u00a0<\/span><\/li>\n<li><span data-contrast=\"none\"> Display output\u00a0<\/span><\/li>\n<\/ol>\n<p><b><span data-contrast=\"none\">Refinements for step 1\u00a0<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">1.1\u00a0\u00a0 RECEIVE\u00a0<\/span><span data-contrast=\"none\">pupilname<\/span><span data-contrast=\"none\">\u00a0FROM (STRING) KEYBOARD\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">1.2\u00a0\u00a0 RECEIVE pupilmark1 FROM (INTEGER) KEYBOARD\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">1.3\u00a0\u00a0 RECEIVE pupilmark2 FROM (INTEGER) KEYBOARD\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">1.4\u00a0\u00a0 RECEIVE pupilmark3 FROM (INTEGER) KEYBOARD\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"none\">Refinements for step 2\u00a0<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">2.1\u00a0\u00a0 SET\u00a0<\/span><span data-contrast=\"none\">totalmarks<\/span><span data-contrast=\"none\">\u00a0TO pupilmark1 + pupilmark2 + pupilmark3\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">2.2\u00a0\u00a0 SET average TO\u00a0<\/span><span data-contrast=\"none\">totalmarks<\/span><span data-contrast=\"none\">\/5\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"none\">Refinements for step 3\u00a0<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">3.1\u00a0\u00a0 SEND [\u201cThe total mark is:\u201d &amp;\u00a0<\/span><span data-contrast=\"none\">totalmarks<\/span><span data-contrast=\"none\">] TO DISPLAY\u00a0<\/span><\/p>\n<p><span data-contrast=\"none\">3.2\u00a0\u00a0 SEND [\u201cThe average score is:\u201d &amp; average] TO DISPLAY<\/span><\/p>\n<p><b><span data-contrast=\"none\">Note:\u00a0<\/span><\/b><span data-contrast=\"none\">The difference between an algorithm and\u00a0<\/span><span data-contrast=\"none\">pseudocode<\/span><span data-contrast=\"none\">.\u00a0<\/span><\/p>\n<ul>\n<li data-aria-posinset=\"1\" data-aria-level=\"2\"><span data-contrast=\"none\">An\u00a0<\/span><b><span data-contrast=\"none\">algorithm\u00a0<\/span><\/b><span data-contrast=\"none\">is a well-defined\u00a0 sequence of steps that\u00a0<\/span><span data-contrast=\"none\">provides\u00a0<\/span><span data-contrast=\"none\">a solution for a problem<\/span><span data-contrast=\"none\">.<\/span><\/li>\n<li data-aria-posinset=\"2\" data-aria-level=\"2\"><b><span data-contrast=\"none\">Pseudocode<\/span><\/b><b><span data-contrast=\"none\">\u00a0<\/span><\/b><span data-contrast=\"none\">is the language that the\u00a0<\/span><span data-contrast=\"none\">design\u00a0<\/span><span data-contrast=\"none\">is written in.\u00a0<\/span><\/li>\n<li data-aria-posinset=\"3\" data-aria-level=\"2\"><span data-contrast=\"none\">Please note this is not proper English\u00a0<\/span><span data-contrast=\"none\">but not\u00a0<\/span><span data-contrast=\"none\">a High Level Language either.\u00a0<\/span><\/li>\n<\/ul>\n<h2 style=\"color: red\">Structured Diagram<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-203\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900-300x147.png\" alt=\"\" width=\"945\" height=\"463\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900-300x147.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900-1024x503.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900-768x377.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900-624x307.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205153\/Screenshot-2022-05-10-204900.png 1260w\" sizes=\"auto, (max-width: 945px) 100vw, 945px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-204\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000-300x183.png\" alt=\"\" width=\"884\" height=\"539\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000-300x183.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000-1024x625.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000-768x469.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000-624x381.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205219\/Screenshot-2022-05-10-205000.png 1260w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"color: red\"><strong>Flow Chart<\/strong><\/h2>\n<p><span data-contrast=\"none\">The owners of a theme park have asked that a program be developed to record the average number of visitors in a week.\u00a0<\/span> \u00a0<span data-contrast=\"none\">A\u00a0<\/span><span data-contrast=\"none\">user will enter the total number of visitors for each day of the week.\u00a0<\/span>\u00a0<span data-contrast=\"none\">The\u00a0<\/span><span data-contrast=\"none\">program should then output the average number of visitors across the week.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-206\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205513\/Screenshot-2022-05-10-205434-210x300.png\" alt=\"\" width=\"838\" height=\"1197\" \/><\/p>\n<h2 style=\"color: red\">Interface<\/h2>\n<p><span data-contrast=\"none\">A user interface is the part of software that the user sees and interacts with.\u00a0<\/span>\u00a0<span data-contrast=\"none\">The\u00a0<\/span><span data-contrast=\"none\">user interface often includes features that allow the user to input data and includes areas where the user will see on-screen output.<\/span>\u00a0<span data-contrast=\"none\">When designing user interfaces, it is common practice to create wireframes.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-207\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654-300x109.png\" alt=\"\" width=\"834\" height=\"303\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654-300x109.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654-1024x372.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654-768x279.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654-624x227.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205740\/Screenshot-2022-05-10-205654.png 1260w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-208\" src=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718-300x165.png\" alt=\"\" width=\"802\" height=\"441\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718-300x165.png 300w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718-1024x564.png 1024w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718-768x423.png 768w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718-624x344.png 624w, https:\/\/blogs.glowscotland.org.uk\/glowblogs\/public\/phsn5computingscience\/uploads\/sites\/10033\/2022\/05\/10205802\/Screenshot-2022-05-10-205718.png 1191w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The design is very important, the programmer needs to work out the details of the program.\u00a0The programmer will consider the user interface and structure of the program. Stepwise Refinements This is a method of taking\u00a0a large problem and breaking it down into smaller more manageable problems.\u00a0 Stepwise\u00a0refinement is also called\u00a0top down design\u00a0as the process is [&hellip;]<\/p>\n","protected":false},"author":79984,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-199","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/users\/79984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":5,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/199\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/pages\/199\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phsn5computingscience\/wp-json\/wp\/v2\/media?parent=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}