Assignment 1: A Dynamic String Array
In this assignment your task is to implement, and test, a set of functions that implement a dynamic array of strings.
For this assignment, put all the code you write into a single file named
a1.cpp. that starts like this:
// a1.cpp ///////////////////////////////////////////////////////////////////////// // // Student Info // ------------ // // Name : <put your full name here!> // St.# : <put your full SFU student
Assignment 2: An Object-oriented Dynamic String Array
In this assignment your task is to essentially re-do a assignment 1, but this time using object-oriented programming. The resulting
str_vec class is much easier to use than the version in assignment 1 because it manages its memory automatically.
For this assignment, all the code you write should be put into a file named
a2.cpp that looks like this:
// a2.cpp ///////////////////////////////////////////////////////////////////////// // // Student Info // ------------ // // Name : <put your full name here!> // St.# : <put your full SFU student
Assignment 3: Chatbots In this assignment your task is to implement and test a number of different chatbots. Each different chatbot is implemented in a class that inherits from the Chatbot base class given below. Getting Started For this assignment, all the code you write should be put into a file named a3.cpp that looks…This content is for IT & Web programming task members only.Log In Register
Assignment 4: Recursion
In this assignment, your task is to practice writing recursive functions. The questions are in the file
a4.h, and each question asks you to write a recursive function according to a specification given in the source code itself.
The functions are specified using pre-conditions, post-conditions, and constraints. For example, here is the specification for a function that sums the integers from 1 to n:
// Pre-condition: // n >= 0 // Post-condition: // Returns the sum of the first n integers, i.e. 1 + 2 + 3 + ... + n. // If n is 0, then 0 is returned. // Constraints: // Must be implemented using recursion (and no loops). You can write // helper functions if necessary. // Note: // You don't need to worry about sums that overflow int. int sum(int n);
The pre-condition states what must be true before the function is called, and the post-condition states what must be true after the functions finishes running correctly (assuming that the pre-condition held before it was called).
The constraints part of the specification lists any other things that must be true for the function. In this assignment, the major constraint is that no loops are allowed in any of the code you write.
Important: No loops are permitted in any of the code you write for this assignment (not even in the test functions).
For each function, you must also write a corresponding test function that automatically runs tests on the function to help ensure it is working correctly. Typically, this is a series of
assert statements that call the function and compare its results to the known correct answer.
For example, the test function for
sum from above could be written like this:
A Personal Database In this project, you are to design and implement a book database. Your database will store book records, and each book records has, at least, these fields: Title Author Date of publication Book type: hardcover, softcover, or digital ISBN # (yes, there is more than one kind of ISBN — it’s your…This content is for IT & Web programming task members only.Log In Register
Programming Concepts Assignment (March 2020) The purpose of this assignment is to show how well you can develop a programming project. It will give you an opportunity to display your knowledge of the Python programming language. This assignment is marked initially with a maximum score of 100. It is then weighted to contribute 25% to…This content is for IT & Web programming task members only.Log In Register
Business Analytics Coding Semester 201 – Assignment 2 Part 1 (40 marks) Tasks 1-5 focus on housing data from the 1990 California census, with each row representing a census block group, which is the smallest geographical unit for which sample data is provided by the U.S. Census Bureau. A census block group usually has a…This content is for IT & Web programming task members only.Log In Register