Describe at least three changes that would make it easier

Assignment Help Basic Computer Science
Reference no: EM13706566

Question: Although the subsequent code compiles and runs, the programmer broke some major readability rules.

Describe at least three changes that would make it easier for other programmers to read and understand the code.

class Program { static void Main() //TBD

{

   double count;

   double Double = 10; // declare variables

   for(int i = 0;i < Double;i++) //keep doing

        {

            count=function(i);

            Console.WriteLine(count);

        }

        Console.Read();

        }

        public static double function(int a) //a function

        {

        return (Math.Sqrt(a));

        }

   }

I am having difficulty with this program because I do not know where to start with.

Reference no: EM13706566

Questions Cloud

Kinds of functionality in the graphical sense : You have to be familiar with the "Fun" part of Java utilizing the GUI. - Why do you think Java and Java's GUI are so popular?
What is the fragmentation : A system uses a page size of the 4 Kbytes and a program size of 46 kbytes is allocated memory. What is the fragmentation?
Show the source code for console application : Show the source code for a C# console application named"MyName" that prints your last name, a tab, and then your first name.
Show the performance improvement over scalar pipeline : Show the performance improvement over scalar pipeline processing and no-pipeline processing, assuming an instruction cycle similar to figure 4.1 in the commentary, i.e.:
Describe at least three changes that would make it easier : Although the subsequent code compiles and runs, the programmer broke some major readability rules -  Describe at least three changes that would make it easier for other programmers to read and understand the code.
Explain how parameter passing by value and by reference : Briefly explain how parameter passing by value and by reference is accomplished in memory. Write statement 1 to call Method A below.
Develop game using the concepts of cohesion : Develop any game of your choice using the concepts of Cohesion, Coupling and RDD, i.e., responsibility-driven design.
What is the frequency of its third harmonic : What is the total average power for a commercial AM transmitter with an un-modulated carrier power of 20 kW and 100% modulation - What is the frequency of its third harmonic?
Implement a java program that generates the receipt : Create a Receipt class that could be used by an automobile parts store. Items to include as data members are receipt number date of purchase, customer number, customer name and address, customer phone number, item number, description, unit price, ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What would you recommend to meet your company needs

Your company wants to implement a strategy for backing up network data. It wants a strategy that allows it to back up changed files on a daily basis and recover lost files quickly in the event of disk failure. What would you recommend to meet your..

  How many clock cycles are needed

Indicate data dependency in the code below. Assuming there is no forwarding in the pipeline, howmany clock cycles are needed to finish the program? If full forwarding is used, how many clock cycles are needed?

  Write a class encapsulating a course

write a class encapsulating a course. Where a course is assumed to have three attributes: a code name, a description and number of credits.

  In network cabling technology

In network cabling technology, what does the "100" in 100BaseT stand for?n network cabling technology, what does the "100" in 100BaseT stand for?

  The shift of american health insurance policiesnbsphow the

the shift of american health insurance policiesnbsphow the changes affect our economynbspi.nbsp a brief explanation of

  Prove complement is unique

Prove complement is unique

  Purchase a pre-built personal computer

Purchase a pre-built personal computer

  Access the administrative tools

Access the Administrative Tools

  How far could it transmit a signal

A step-index multimode fiber has a modal dispersion of about 30 ns/km. Using the formula for maximum data rate for a given dispersion, about how far could it transmit a signal at 1Gbit/s?

  Explaining notifier sends e-mail to system administrator

Suppose a notifier sends e-mail to the system administrator when a successful compromise of that system is detected. What are the drawbacks of this approach?

  Explaining seven steps of information gathering

Write and explain the seven steps of information gathering.

  Create a florida state information system

Create and use a Microsoft Access Database from which the program will retrieve the city information. Include 1 table with 5 fields per row, and 10 rows of data (cities).

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