Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WRITE A CODE IN C++ WHICH CONTAINS A CLASS AND A MEMBER FUNCTION THAT TAKES A FILE AS INPUT AND FINDS THE NUMBER OF LINES

WRITE A CODE IN C++ WHICH CONTAINS A CLASS AND A MEMBER FUNCTION THAT TAKES A FILE AS INPUT AND FINDS THE NUMBER OF LINES OF CODE-THE LINES OF CODE DO NOT INCLUDE LINES THAT ARE BLANK AND COMMENTS.ALSO COUNT SEPARATELY THE NUMBER OF LINES IN A FUNCTION AND THE NUMBER OF LINES IN EACH CLASS.MAKE SURE IT HAS CLASS AND. FUNCTIONS FOLLOW THE DETAILS GIVEN IN THE PICTURE CAREFULLY !!!! image text in transcribed
Assignment:Write a program to count the total program LOC, the total LOC in each proxy the program contains, and the number of methods in each proxy. Notes:- Your program should accept as input the name of a file that contains source code. You are to read the file and count the number of lines of code per proxy according to your LOC Counting Standard. You may assume that the source code adheres to your LOC Coding Standard, e.g., this program should not detemine if the coding standard has been followed Your program should produce output following the general format below. Please do not clutter your submitted test results with extraneous output. Program Proxy Name Number of Methods Proxy LOC Total LOC 1 Average 10 30 25 Main 102 2 InputLine Token Main 30 20 75 3 Inputline Token 100 50 A "proxy is defined as a recognizable collection of LOC. Objects are typical proxies in an object-oriented systems subprograms are typical proxies in traditional functionally-decomposed systems. If you are using a functionally-decomposed (meaning, non-OO) approach, the number of methods for each proxy will be *1. If you are using an O0 approach, the number of methods will be a count of the methods associated with an object or "1" for stand-alone subprogams Ploase provide an oxplanation if the "Total LOC" count is not oqual to tho sum of the Proxy LOC. Test your program using the source code from Assignments 1, 2, and 3. This homework assignment is be accomplished individually Please note that future homework assignments may require the use of your LOC counter Be honest in your data. Your grade depends on how you follow the process, not on the speed of your work or the number of defects found

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logic In Databases International Workshop Lid 96 San Miniato Italy July 1 2 1996 Proceedings Lncs 1154

Authors: Dino Pedreschi ,Carlo Zaniolo

1st Edition

3540618147, 978-3540618140

More Books

Students also viewed these Databases questions

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago