subject

The previous Discussions have provided the opportunity to share some elegant solutions to programming challenges, and many of them share one common trait—they all handle multiple objects with ease. Forget, for the moment, about some of the complexity involved. The formulas may seem strange, but do not worry. At this stage of programming, you are not expected to generate such things on your own; very few new programmers can. Instead, stop to consider the ways programs embrace the computer’s true assets. Machines do not mind doing the same thing over and over again; they never get bored. They are also capable of handling massive amounts of data in an impeccably organized manner. One of your challenges as a programmer is to communicate, through code, in an efficient way that plays to the computer’s strengths.

Consider, for example, having to write a program to manage personnel records for all of the people working for your company. You certainly would not want to have to write a program with a unique variable for each unique person in the company. Every time a new employee was hired, someone would have to modify the program to add a new variable for that employee. Every time an employee left the company, someone would have to modify the program to remove that employee’s variable and data from the program. Clearly, this would be a very tedious way to automate personnel records. Instead, you need a way to manage that collection of personnel information in a more organized manner. In fact, you need a way of representing the collection of individual employees as just that, a single variable that provides access to all of the employees. Then, you can use loops to process the employee data. Fortunately, Java provides the concept of an array (and other similar collections, such as the ArrayList) to manage collections of similar objects.

It takes time to truly grasp how powerful object-oriented programming can be and how you can harness its "objects-first" focus to make your own programs concise and elegant. Unfortunately, some programmers do not invest that time. They rely on brute force—repetitive methods resulting in long programs that are, by nature, hard to review and debug.

Return to the open source repositories you previously explored. Find a program that (A) uses at least one loop and a list effectively or (B) could use a loop and a list to improve the program.

*. Response that summarizes your findings. The post should:

1. Include a copy of the code that either (A) exemplifies concise, generalized code or (B) presents the perfect opportunity to apply loops, arrays, and lists to reduce the length of the program using a more elegant solution. Do not undertake a lengthy program; limit your code to approximately 20 lines.
2. If the code is an exemplar of good coding, explain what leads you to that conclusion. Be specific.
3. If the code needs improvement, include a rewritten version of the code, in which you apply one of the methods described above to improve the program. Explain how your solution better embraces a computer’s strengths as a tool that can perform calculations quickly, perform repetitive tasks, and/or manage data effectively.
4. Add or revise comments in the code to accurately describe the function of the loop and list.
Do not include the entire source code of the program you choose. Select just the portion with the necessary information, such as variable declarations and methods called from outside the class or method.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 01:10
Problem 1 - hashing we would like to use initials to locate an individual. for instance, mel should locate the person mark e. lehr. note: this is all upper case. generate a hash function for the above using the numbers on your telephone. you know, each letter has a number associated with it, so examine your telephone keypad. generate 512 random 3 letter initials and take statistics on a linked list array size 512 to hold this information report how many have no elements, 1 element, 2 elements, does this agree with the hashing statistics distribution?
Answers: 1
You know the right answer?
The previous Discussions have provided the opportunity to share some elegant solutions to programmin...
Questions
question
Mathematics, 20.09.2020 03:01
question
Mathematics, 20.09.2020 03:01
question
Biology, 20.09.2020 03:01
question
Mathematics, 20.09.2020 03:01
Questions on the website: 13722360