Please comment the code in great detail. The purpose of this assignment is to r

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

Please comment the code in great detail.
The purpose of this assignment is to reinforce the things that can go wrong while programming.
You will demonstrate programming gone wrong for the following situations.
1)  Demonstrate an error where a function returns the address of a locally declared variable rather than a dynamically allocated memory location.  Show that the value is changed inadvertently by another variable.
2)  Demonstrate an error where there is a memory leak in a loop that causes the program to crash or be killed off by the OS.
3) Demonstrate an error where you reference a deleted memory location.  Show that the value is changed inadvertently by another variable.
4) Demonstrate an error where you fail to use a virtual destructor and you delete an object of an inherited class and it causes a memory leak or  unexpected behavior.
5)  Demonstrate an error where you perform a shallow copy of a pointer-based data structure (eg, linked list from assignment #4) when you really should be performing a deep copy.  You can either demonstrate this through the values inadvertently changing, or by demonstrating errors when you call the destructor on both copies.
Make it obvious in each program’s output what the expected behavior should be and what the error behavior is.
You will submit submit 5 programs that demonstrate these programming mistakes labeled Prog1.cpp, Prog2.cpp, Prog3.cpp,  Prog4.cpp, and Prog5.cpp.  You may include other files as needed (eg, the classes in Prog4).  You will also include a shell script named demo.sh that is similar to what I’ve given you in the first 4 assignments that compiles and runs all 5 programs.
Each program is worth 20 points.  15 points of that is the error, and 5 points is for comments in the code that point out exactly where the error is, and how you would fix the error.

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services