Lab 7 - IntVector intro
Goals
By the end of this lab you should:
have a good head start on the IntVector assignment
have fully tested the constructors and accessor functions
be confident these functions work correctly
Collaboration policy:
For this lab
Assignment 4: Bulletin Board
(Part 1)
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your solution to this
assignment. In fact, you may not even look at another student's solution or partial soluti
Lab 4 - Rational class
Goals
By the end of this lab you should:
be more familiar with declaring and using your own ADT (class).
Rational class
Rational Numbers
It may come as a bit of a surprise when the C+ floating-point types (float,
double), fail to c
Lab 5 - Distance class
Goals
By the end of this lab you should:
be more familiar with declaring and using your own ADT (class).
know how to declare and implement an overloaded operator function
Distance class
Distance represents a length, consisting of
Lab 10 - Dynamic Memory & Classes
Goals
By the end of this lab you should:
Know how to write a copy constructor, an overloaded assignment operator, and an overloaded
stream insertion operator.
Understand the difference between shallow vs deep copies.
In
Name_ Login_
CS 012 Practice Questions
Only bubble in one best answer per question.
Winter - 2016
1. Suppose that p1 and p2 are both pointers to the same dynamically-allocated integer value; y is a
local integer variable. After the execution of which of t
Name_ RSub username _
CS 012(v) Intro to Computer Science II
Mid-term exam Wednesday 8/12
Summer - 2015
Total 88 points
Time: 90 mins.
You may have on your desks ONLY this exam, your "bubble sheet", plus one or two sheets
of blank scratch paper; use a blu
CS 012
Sample Midterm Questions Coding
Summer - 2015
1. Write a function named split that passes in 3 Cstrings and a character. The split function should
split the first Cstring (s) into 2 parts, putting the first part in Cstring a and the remaining part
CS 012
Sample Midterm Questions M.C.
Summer - 2015
1. What is output by the following code block?
(? represents garbage or unknown values)
int a[5] = cfw_4,3,2;
for (int i = 0; i < 5; +i) cfw_
cout < a[i] < ' ';
a. 4 3 2 2 2
b. 4 3 2 ? ?
c. 4 3 2 0 0
d.
Name_ILearn username_ Lab Section _
CS 012(v) Intro to Computer Science II
Mid-term exam Wednesday 8/12
Summer - 2015
Total 88 points
Time: 90 mins.
You may have on your desks ONLY this exam, your "bubble sheet", plus one or two sheets
of blank scratch pa
CS 010 - Introduction to Computer Science I
Lab 4 - Branching
Before tackling this lab, you should have completed:
Zyante Chapter 3 sections 3.1 3.4; 3.6; 3.8 - 3.9, and corresponding Codelab exercises
Video tutorials: Module 4 playlist
Collaboration poli
Lab 1 Specifications
Points
Number Guessing Game (3 points)
PI Estimation (3 points)
Vector search & remove (4 points)
Goals
By the end of this lab you should (if you weren't already):
Be familiar with the cloud9 editor.
Know how to compile your code us
Assignment 5: IntVector
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your
solution to this assignment. In fact, you may not even look at another student's solution or partial
solution to this ass
In this assignment, you will be extending your bulletin board project, so first make sure you have your previous BBoard assignment working perfectly.
We will be adding two major new functionalities:
1.
The bulletin board will now be able to handle replies
Lab 8 - IntList intro
Goals
By the end of this lab you should:
have a good head start on the IntList assignment
have fully tested the functions required by this lab
be confident these functions work correctly
Collaboration policy:
For this lab, collabo
Lab 8 - IntList intro
Goals
By the end of this lab you should:
have a good head start on the IntList assignment
have fully tested the functions required by this lab
be confident these functions work correctly
Collaboration policy:
For this lab, collabo
CS 12 - Assignment 1: Noise Signals
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your
solution to this assignment. In fact, you may not even look at another student's solution or partial
solution
Temperature Distribution: The temperature distribution in a thin metal plate with
constant (or isothermal) temperatures on each side can be modeled using a two
dimensional grid, as shown in Figure 7.8. Typically, the number of points in the grid are
speci
Assignment 4 Solution
1. Caesar Cipher
k = 20
C = E(P + k) mod (26),
C = Cipher Text,
P = Plain Text
k = shift
I am sending a secret message
i (8 + 20) mod 26 = 2 = c
a (0 + 20) mod 26 = 20 = u
m (12 + 20) mod 26 = 6 = g
c ug myhxcha u mywlyn gymmuay
2. H
Assignment 2: Temperature Distribution
Collaboration Policy
You may not use code from any source (another student, a book, online, etc.) within your
solution to this assignment. In fact, you may not even look at another student's solution or partial
solut
CHAPTER 1 INTRODUCTION
bits: origin from engineers using switching board and marked a positive voltage as a '1' and a
zero voltage as zero
-1st electronic computers in the 1930s and 1940s
-processors used to take up entire rooms, now they can fit on a chi
Setting up your programming environment
This is a programming course, and the tool you will be spending most of your time immersed in your home away from home for the next few weeks! - will be your IDE: Integrated
Programming Environment. In our case, tha
CS 010 - Introduction to Computer Science I
Lab 3 - Arithmetic operations and data types.
Before tackling this lab, you should have completed:
Zyante Chapter 2 sections 2.12 to 2.18, and corresponding Codelab exercises
Video tutorials: Module 3 playlist
C
CS 010 - Introduction to Computer Science I
Lab 2 - Using variables for math, input and output
Before tackling this lab, you should have completed:
Zyante Chapter 2 sections 2.1 to 2.10, and corresponding Codelab exercises
Video tutorials: Module 2 playli
Lab 2 Specifications
Goals
By the end of this lab you should:
be more familiar with arrays
be more familiar with c-style strings
be more familiar cstring library functions
strcat implementation
1. Define your own version of the strcat function that wor
/DE'LVWDQFHFODVV
*RDOV
'LVWDQFHFODVV
feet
inches
7KH&ODVV6SHFLILFDWLRQ
Distance(unsignedft,doublein)
ft
in
feet
in
inches
Distance(doublein)
feet
init()
in
inches
amemberfunctionconvertToInches()thatreturnsthedistanceinall
inchesdoesnotchangethestateofthe