Lab 2: Algorithm
Objective:
Define an algorithm and relate it to problem-solving
Define three constructs and describe their use in algorithms.
Describe pseudocode and how they are used in algorithms.
Describe UML diagrams and how they are used in algorithms.
Materials:
Based on exercises of chapter 8 in the textbook “Foundations Of Computer Science, 4nd
Edition, Behrouz Forouzan, 2017.”
Student’s task:
– Review the whole chapter 8 content in the textbook.
– Write down solutions to exercises (step by step)
– Finish exercises and submit the results to the lecturer in class.
Scoring scale: 10
Students will represent the algorithm of the problem in two ways: pseudo-code and UML
Sample: Write an algorithm to calculate the sum of two integers
Using pseudo-code:
Input: num1, num2
Processing: result=num1+num2
Output: print out result
Lab 2: Algorithm
Objective:
Define an algorithm and relate it to problem-solving
Define three constructs and describe their use in algorithms.
Describe pseudocode and how they are used in algorithms.
Describe UML diagrams and how they are used in algorithms.
Materials:
Based on exercises of chapter 8 in the textbook “Foundations Of Computer Science, 4nd
Edition, Behrouz Forouzan, 2017.”
Student’s task:
– Review the whole chapter 8 content in the textbook.
– Write down solutions to exercises (step by step)
– Finish exercises and submit the results to the lecturer in class.
Scoring scale: 10
Students will represent the algorithm of the problem in two ways: pseudo-code and UML
Sample: Write an algorithm to calculate the sum of two integers
Using pseudo-code:
Input: num1, num2
Processing: result=num1+num2
Output: print out result
<!– Composite Start
Loading…
(function(){
var D=new Date(),d=document,b=’body’,ce=’createElement’,ac=’appendChild’,st=’style’,ds=’display’,n=’none’,gi=’getElementById’;
var i=d[ce](‘iframe’);i[st][ds]=n;d[gi](“M215518ScriptRootC162893”)[ac](i);try{var iw=i.contentWindow.document;iw.open();iw.writeln(“”);iw.close();var c=iw[b];}
catch(e){var iw=d;var c=d[gi](“M215518ScriptRootC162893″);}var dv=iw[ce](‘div’);dv.id=”MG_ID”;dv[st][ds]=n;dv.innerHTML=162893;c[ac](dv);
var s=iw[ce](‘script’);s.async=’async’;s.defer=’defer’;s.charset=’utf-8′;s.src=”//jsc.mgid.com/e/b/ebookbkmt.com.162893.js?t=”+D.getYear()+D.getMonth()+D.getDate()+D.getHours();c[ac](s);})();
–>

%20(1).png)