Part 1
Part 2
Part 3
Part 4
Extra Credit
100
Write a code to sum the numbers from 1 to n.
Write a code to sum the numbers from 1 to n.
100
Write a class header with two private member fields, two accessors, two mutators, and one constructor that sets the fields.
Write a class header with two private member fields, two accessors, two mutators, and one constructor that sets the fields.
100
Write a code to remove the tail (last node) of a linked list.
Write a code to remove the tail (last node) of a linked list.
100
Write a code to evaluate the nth Fibonacci number.
Write a code to evaluate the nth Fibonacci number.
100
Write a Python code to sum the numbers from 1 to 10.
Write a Python code to sum the numbers from 1 to 10.
200
Write a code to return the reverse of a string.
Write a code to return the reverse of a string.
200
Write a header which gives an example of a has-a relationship using two unique classes.
Write a header which gives an example of a has-a relationship using two unique classes.
200
Write a code (non-member function) to reverse a stack.
Write a code (non-member function) to reverse a stack.
200
Write a code to recursively calculate the size of a linked list.
Write a code to recursively calculate the size of a linked list.
200
Write a Java "Hello, World" program.
Write a Java "Hello, World" program.
300
Write a code which can accept command-line arguments and print them in reverse order.
Write a code which can accept command-line arguments and print them in reverse order.
300
Write a header which gives an example of a is-a relationship using two unique classes.
Write a header which gives an example of a is-a relationship using two unique classes.
300
Write a code (non-member function) to reverse a queue.
Write a code (non-member function) to reverse a queue.
300
Write a three-line code Tree::reverse() to swap the left and right child of each node in a Tree.
Write a three-line code Tree::reverse() to swap the left and right child of each node in a Tree.
300
Write a script to number-line all .cpp files in the current directory and pause for the user to hit Enter between each.
Write a script to number-line all .cpp files in the current directory and pause for the user to hit Enter between each.
400
Write a code which will print "Correct" only if the number of arguments is equal to the program name.
Write a code which will print "Correct" only if the number of arguments is equal to the program name.
400
Write a generic function to reverse an array of any type.
Write a generic function to reverse an array of any type.
400
Write a code to up-rotate a stack.
Write a code to up-rotate a stack.
400
Write a fork bomb (as a shell script); that is a recursive function that calls itself and at the same time spawns a recursive call to itself in the background.
Write a fork bomb (as a shell script); that is a recursive function that calls itself and at the same time spawns a recursive call to itself in the background.
500
Write a program which will try to sum the numbers 1 to n of its first argument n; but if n is not a number, it will throw an error, which is caught and printed. You do not have to write the function sum.
Write a program which will try to sum the numbers 1 to n of its first argument n; but if n is not a number, it will throw an error, which is caught and printed. You do not have to write the function sum.
500
Overload the + operator for a struct imag which contains real and imaginary components a and b.
Overload the + operator for a struct imag which contains real and imaginary components a and b.
500
Write a code to reverse a linked list.
Write a code to reverse a linked list.
500
Write a recursive code to evaluate pi.
Write a recursive code to evaluate pi.
500
?
?
M
e
n
u