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

  Program that compares the number of possible sequences

Write a c++ program that compares the number of possible sequences of the length L that can be generated. The program must output a formatted list comparing the number of possible sequences for L=5,6,7,8,9. given size N=9

  Declare a 1-dimensional array of integers

In pseudocode and in C code, declare a 1-dimensional array of Integers called InternetHits that will hold up to 10 Integer values representing the number of hits a Web site receives.

  Write a program that simulates an airplane race

Program will use a function that has the following parameters: time and acceleration and function will pass back two data items: speed and distance.

  Develop a program that when you pipe in a file

develop a program that when you pipe in a file it will demonstrate on the left had side the line number  work by having a program piped in and when a \n occurs a new line and number is indicated.

  Calculation of mortgage interest rates

Instruction of pointers and the calculation of mortgage interest rates.

  Calculate the celsius equivalent of a fahrenheit temperature

Construct a program that allows you to calculate the Celsius equivalent of a Fahrenheit temperature.

  Print out the sum of all numbers, the average

Write a program that reads in a list of integer numbers and print out the sum of all numbers, the average, the lowest and the highest value entered. The first input number indicates how many numbers the program is attempting to read

  Write a program using for loops t

Write a program using for loops to produce the following output. Please read carefully the entire specification!

  Write a program in c of fibonacci series

Write a program in c of fibonaci series with and without using fibo func, both

  A string of characters has balanced parentheses

A string of characters has balanced parentheses if each right parenthesis occurring in a string is matched with a preceding left parenthesis

  Create program that uses functions and reference parameters

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

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

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