HW9(100pts) The homework Due on May 26, 23:59:59 請注意:本次作業開始,請將所有的檔案從gitlab刪除,只留下當 次的作業。例如本次作業應該只需要以下檔案上傳至Gitlab。 HW9請沿用HW8的algorithm.h檔案.

Slides:



Advertisements
Similar presentations
Chapter 5 Loops Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
Advertisements

Looping while … do …. Condition Process 2 Process 1 Y Repeated Loop.
Using Flowcharts. Sample Flowchart (without text) 2.
1 Lab Session-3 CSIT221 Spring 2003 b Group Worksheet 3 Exercise (Demo Required) b No new lab demo will be assigned to allow you to focus on HW#1.
06 Testing selection1June Testing selection CE : Fundamental Programming Techniques.
JavaScript with Input & Output Step 1: Use tags JavaScript Template.
Created by Mrs. G for the ecatechlab.weebly.com
Operating System Program 5 I/O System DMA Device Driver.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington While loops and the UI API.
22/11/ Selection If selection construct.
LAB SESSION ONE DIMENSIONAL ARRAY.
مقدمة في البرمجة Lecture 7. Write VB.net project using the for loop to calculate : 1- the sum of numbers from 1 to (A) numbers. 2- the sum of Odd numbers.
COMP Loop Statements Yi Hong May 21, 2015.
Functions, Part 1 of 3 Topics  Using Predefined Functions  Programmer-Defined Functions  Using Input Parameters  Function Header Comments Reading 
Homework #4: Operator Overloading and Strings By J. H. Wang May 22, 2015.
Functions Input and output Lecture 2. Constants #define – is a preprocessor directive Most common use.
Processing multiple files
Starter What does the following code do?
Homework 3 (due:May 27th) Deadline : May 27th 11:59pm
HW5(50pts) The homework Due on April 14, 23:59:59
HW7(100pts+10bonus) The homework Due on May 11, 23:59:59
HW3 (100Points) The homework Due on March 17, 23:59:59
Homework 3 (due:June 5th)
Computing Functions with Turing Machines
Chapter 4: Making Decisions.
CMSC201 Computer Science I for Majors Lecture 10 – Functions (cont)
Model Functions Input x 6 = Output Input x 3 = Output
For Monday Read WebCT quiz 18.
Hash table another data structure for implementing a map or a set
2008/11/05: Lecture 15 CMSC 104, Section 0101 John Y. Park
Turing acceptable languages and Enumerators
HW8(60pts) The homework Due on May 19, 23:59:59 請注意:本次作業開始,請將所有的檔案從gitlab刪除,只留下當 次的作業。例如本次作業應該只需要以下檔案上傳至Gitlab.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired. 1.
Functions, Part 1 of 3 Topics Using Predefined Functions
If selection construct
Chapter 5 Loops.
Chapter 5 Loops Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
Turing acceptable languages and Enumerators
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired. 1.
Exercise Solution First questions What's output What's input
CprE 185: Intro to Problem Solving (using C)
Bell Ringer-10/15/2012 Map the following points…
Functions, Part 1 of 3 Topics Using Predefined Functions
You may choose to use any one of these provide slide templates and make changes as desired. 1.
Chapter 4: Repetition Structures: Looping
You may choose to use any one of these provide slide templates and make changes as desired.
You may use a maximum of 5 slides.
Rate of Change The rate of change is the change in y-values over the change in x-values.
Basic Lessons 5 & 6 Mr. Kalmes.
You may choose to use any one of these provide slide templates and make changes as desired. 1.
You may choose to use any one of these provide slide templates and make changes as desired.
You may use a maximum of 5 slides.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
Functions, Part 1 of 3 Topics Using Predefined Functions
2008/11/05: Lecture 15 CMSC 104, Section 0101 John Y. Park
You may choose to use any one of these provide slide templates and make changes as desired.
CprE 185: Intro to Problem Solving (using C)
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
ME 123 Computer Applications I Lecture 4: Vectors and Matrices 3/14/03
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
You may choose to use any one of these provide slide templates and make changes as desired.
Presentation transcript:

HW9(100pts) The homework Due on May 26, 23:59:59 請注意:本次作業開始,請將所有的檔案從gitlab刪除,只留下當 次的作業。例如本次作業應該只需要以下檔案上傳至Gitlab。 HW9請沿用HW8的algorithm.h檔案

Part 1.(10pts) Rewrite your code into template method Please rewrite your function “for_each”, ”all_of” into template method. You can rename class Type and class yourClass

Part 2.(10pts) Create new function remove() Please implement a new function “remove” in algorithm.h . remove: you choose a removeValue, and the remove function will find all the values that match removeValue in your vector and remove them. For example: given vector [20 10 20 20 30], remove 20, the result is [10 30]

Part 3.(20pts)Design UI In main.cpp, you need to design an UI that user can choose which function to execute. The control flow will look like below. 1. main UI 2.choose 1 and input an integer into vector.

3.(assume that the vector is [20 10 20 20 30 20]) choose 2 to show the vector 4.choose 3 and give an operator to calculate with value 2, then choose 2 to show the result.

5. choose 4 and input 22 to remove 22 in your vector, choose 2 to show the result 6.choose 5 to clean the vector, and choose 2 to show the result. 7.choose 6 to exit the program

Part4.(40pts) Unit Test We wrote 13 UT to test your algorithm.h The test data will not be announced. You have to make all of them pass. You know this by checking Reports on Jenkins.

Part5.(20pts) Acceptance Test We wrote 7 AT to test your UI

Addition You can use the string here When choose 2, the output will like this “10 20 30 ”