Is the code properly commented

Assignment Help C/C++ Programming
Reference no: EM13328304

1. Variables

• Do variables have meaningful names?
• Are hard-coded numbers used instead of named constants?
• Is a variable value read only? If so is it declared const or final?
• Are all variables used?

2. Functions
• Do functions have meaningful names?
• Are all parameters used?

3. Correctness
• Are all parenthesis properly matched?
• Are brackets properly matched?
• Does each case in a switch statement terminate with a break? Is there a default case?

4. Initialization
• Are variables initialized before their first use?

5. Loops
• Do all loops successfully terminate?
• If used, do break and continue statements work correctly?
• Does the body of the loop modify the loop variables?

6. Dynamic Allocation
• Is every dynamically allocated piece of memory properly de-allocated?

7. Pointers
• Can a NULL pointer be de-referenced?

8. Comments
• Is the code properly commented?
• Do the comments accurately describe the corresponding code?

9. Defensive Programming
• Are checks made to prevent errors such as divide by zero or illegal data?

Reference no: EM13328304

Questions Cloud

Determine what yield to maturity is the bond offering : A 7.05 percent coupon bond with 17 years left to maturity is offered for sale at $1,045.30. What yield to maturity is the bond offering
Describe the oxidizing and reducing agents : Complete and balance the following equation: BrO3^-(aq)+N2H4(aq) -> Br2(l)+N2(g) (acidic solution) And identify the oxidizing and reducing agents from the resulting balanced equation.
What is the time it takes for the suitcase to reach ground : A suitcase falls out of an airplane which is 400 meters above the ground. What is the time it takes for the suitcase to reach the ground
Calculate the bonds default risk premium : Dakota Corporation 15-year bonds have an equilibrium rate of return of 10 percent. For all securities, the inflation risk premium is 1.50 percent and the real interest rate is 3.00 percent.
Is the code properly commented : Does each case in a switch statement terminate with a break? Is there a default case?
Explain an alkane with the molecular formula c5h12 : Identify an alkane with the molecular formula c5h12 that forms only one monochlorinated product when heated with Cl2
What is change in price the bond will experience in dollars : A 5.95 percent coupon bond with fifteen years left to maturity is priced to offer a 6.9 percent yield to maturity. You believe that in one year, the yield to maturity will be 6 percent. What is the change in price the bond will experience in dolla..
How much kinetic energy does the ball have : Professional baseball pitchers can deliver a pitch which can reach the blazing speed of 100 mph (miles per hour). how much kinetic energy does the ball have
Explain what is the speed of the proton : A proton in a linear accelerator has a de Broglie wavelength of 149\rm pm . What is the speed of the proton?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd