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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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