evaluate the readability of a method/function body.
$10-30 USD
Berlangsung
Dibuat sekitar 9 tahun yang lalu
$10-30 USD
Dibayar ketika dikirim
Description: the purpose of this assignment is to evaluate the readability of a method/function body.
Assignment
Description: the purpose of this assignment is to evaluate the readability of a method/function body.
Input files: [login to view URL] and [login to view URL]
Pre-requirement:
• Understand files [login to view URL] and [login to view URL]
Task
Part 1: develop a java function to evaluate the readability of the body of function
Function name: funcBodyReadability
Input
• function name, e.g. “scanScr” or “scanDir”
• files: [login to view URL] and [login to view URL]
Description
1. For each local variable name in same function in [login to view URL], call the varReadability function (from Assignment 1).
o Each variable matches one row in [login to view URL]
o Note that variables labeled as “ClassField” in column 3 are attributes in a class.
2. Reading distance of the variable v at line i, dist(v, l, i), is defined as the line difference of the declaration of the v at line l and the usage of v at line i .
3. Reading distance of the variable v, dist(v, l), is the sum of dist(v, l, i) where i is all usages of v at the line i declared at line l.
4. Readability of a variable v, read(v), is defined as concreteness (v)/ dist(v, l)
5. Readability of a method m, read(m), is defined as the average of avg(read(V)), where V is the set of variables declared in the method m.
Part 2: develop a function (“main function”) to demonstrate the readability of function body in [login to view URL]
Description:
Use “funcBodyReadability” to demonstration all function readabilities in one project. Order by package name, class name, and function name.
Please output everything in a text files with four columns
Package_name Class_name Function_name Function_Readability