logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
StatAnalytica ExpertManagement
(5/5)

584 Answers

Hire Me
expert
Alexx WardEconomics
(5/5)

987 Answers

Hire Me
expert
Bernard BealeBusiness
(5/5)

681 Answers

Hire Me
expert
Lakshay GabaEnglish
(5/5)

528 Answers

Hire Me
C++ Programming

C/C++ Comment Standards File header each file in the solution shall have a comment block which identifies.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

C/C++ Comment Standards

 

I. File Header

Each file in the solution shall have a comment block which identifies:

 

  1. The file name,

  2. The author of the file,

  3. Modification History

a Who modified the file b When

  1. The classes/procedures in the file with a one line description

 

 

 

/***************************************************************************

  • File: c

  • Author: Richard Goodrum

  • Procedures:

  • main - test program which initializes the data elements, time matmul, and prints results

  • matmul - brute force matrix multiplication

***************************************************************************/

 

 

II.  Class/Procedure Header

Each class/procedure shall have a comment block preceding it which contains:

 

  1. The class/procedure name,

  2. The author of the class/procedure,

  3. Modification History

    1. Who modified the class/procedure

    2. When

  4. A summary description of the class/procedure, 4. A list of all arguments with:

    1. Argument name,

    2. Direction: Input (I/P), Output (O/P), Input/Output (I/.O),

    3. Type (I.e., char, double, float, int, long, ),

    4. One line description of the

 

/***************************************************************************

  • int main( int argc, char *argv[] )

  • Author: Dr. Richard A. Goodrum, D.

  • Date: 16 September 2017

  • Description: Generates two matrices and then calls matmul to multiply

  • Finally, it verifies that the results are

*

  • Parameters:

*         argc

I/P

int

The number of arguments on the command line

*         argv

I/P

char *[]

The arguments on the command line

*         main

O/P

int

Status code (not currently used)

**************************************************************************/

 

/***************************************************************************

  • int matmul( int l, int m, int n, float *A, float *B, float *C )

  • Author: Dr. Richard A. Goodrum, D.

  • Date: 16 September 2017

  • Description: brute force matrix multiplication function.

*

  • Parameters:

*         l

I/P

int

The first dimension of A and C

*         m

I/P

int

The second dimension of A and first of B

*         n

I/P

int

The second dimension of B and C

*         A

I/P

float *

The first input matrix

*         B

I/P

float *

The second input matrix

*         C

O/P

float *

The output matrix

*         matmul

O/P

int

Status code (not currently used)

***************************************************************************/

 

 

III. Inline Comments

Many lines of the file should include comments to describe the concept represented by the line. For example:

y = m * x + b; // Calculate the value of y based on a linear equation and

// the value of x

 

IV. Other Comments

Occasionally, a block of code needs a preamble to explain its nature. Hence, a block comment should precede it.

 

int matmul( int l, int m, int n, float *A, float *B, float *C )

{

int i, j, k;

 

for( i=0; i<l; i++ )                                            // Loop over the rows of A and C.

for( k=0; k<n; k++ )                                      // Loop over the columns of B and C

{

// Initialize the output element for the inner

// product of row i of A with column j of B C[i*n+k] = 0;

for( j=0; j<m; j++ )                                      // Loop over the columns of A and C

{

C[i*n+k] += A[i*m+j] * B[j*n+k];     // Compute the inner product

}

}

}

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme