Question

QUESTION 1 1.   Which programming languages do not have iteration statements and why?        Imperative...

QUESTION 1
1.   Which programming languages do not have iteration statements and why?
       Imperative programming languages require recursion to do anything iteratively
       Object-Oriented Programming languages do not use iteration since functions operate over data structures.
       Functional programming languages since they do not use variables and counting loops require variables.
       Functional programming languages do not have variables and iteration requires variables to operate.
QUESTION 2
1.   One of the downsides of using expressions that produce results other than true or false is
       it hurts writability since we have to write such long expressions.
       it can cause side effects skewing the results of the rest of the code
       it is expensive to type-check
       it hurts readability since it may be confusion to know which route an execution will take.
QUESTION 3
1.   In mixed-mode expressions for Java,
       a narrowing conversion must be made explicitly via casting
       a widening conversion must be made explicitly via casting
       a narrowing conversion must be made implicitly via coercion
       a narrowing conversion must be made explicitly via coercion
QUESTION 4
1.   Which of the following is NOT a control flow structure?
       Assignment statement
       selection statement
       procedure call
       conditional target
QUESTION 5
1.   Why do many programming languages (like Java) have break and continue but not goto?
       break and continue are special situation gotos which are easier to use than goto.
       break and continue are special situation gotos which provide most of the functionality necessary without harming readability.
       break and continue can be used just like goto therefore goto is never necessary
       break and continue provide the same functionality without the overhead of goto

Homework Answers

Answer #1

Answer 1:
Functional programming languages since they do not use variables and counting loops require variables.

Answer 2:
it hurts readability since it may be confusion to know which route an execution will take.

Answer 3: a narrowing conversion must be made explicitly via casting
Answer 4: Assignment statement

Answer 5: break and continue provide the same functionality without the overhead of goto

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
   QUESTION 6 1.   If we wanted something like the python else statement for a counter...
   QUESTION 6 1.   If we wanted something like the python else statement for a counter controlled loop in Java, what would it look like?        Since there is no way for a loop in Java to tell you if it completed without breaks or continues, you'd need to set a boolean flag to indicate that and check it after the loop was completed.        We simply check either break or continue flags to see if either is...
QUESTION 6 1.   Why are strings usually primitive (or near-primitive) in modern programming languages?       ...
QUESTION 6 1.   Why are strings usually primitive (or near-primitive) in modern programming languages?        readability        readability and writeability        efficiency        readability, writeability, and efficiency QUESTION 7 1.   There are two main problems with pointers:        dangling pointers & memory leaks        marked sweep and memory leaks        dangling pointers & tombstones        reference counters and marked sweep QUESTION 8 1.   Which of the following implementations of arrays can grow?...
1) Consider the following Java program. Which statement updates the appearance of a button? import java.awt.event.*;...
1) Consider the following Java program. Which statement updates the appearance of a button? import java.awt.event.*; import javax.swing.*; public class Clicker extends JFrame implements ActionListener {     int count;     JButton button;     Clicker() {         super("Click Me");         button = new JButton(String.valueOf(count));         add(button);         button.addActionListener(this);         setSize(200,100);         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         setVisible(true);     }     public void actionPerformed(ActionEvent e) {         count++;         button.setText(String.valueOf(count));     }     public static void main(String[] args) { new Clicker(); } } a. add(button);...
Workplace Application - Assessment 2 What’s the current situation? “Extreme rain fall” events in Brazil have...
Workplace Application - Assessment 2 What’s the current situation? “Extreme rain fall” events in Brazil have been on the rise since the 1980s. In Guarujá a coastal town 25 miles from Soa Paulo, 18 people were killed in a single monsoon rain. The rise of global temperatures worldwide is likely to produce more extreme events for the area. Pirelli Tires a well-known performance tire manufacturer has been hit especially hard. In 2003, Pirelli built a 345,000 square foot manufacturing plant...
Point/Counterpoint from chapter 16. Take a stand. Do you agree or disagree? Write a minimum of...
Point/Counterpoint from chapter 16. Take a stand. Do you agree or disagree? Write a minimum of one paragraph. Chapter 16 The Hierarchical Structure: The Superior Format Point Yes The hierarchy is the enduring foundation for how MNEs optimally arrange the roles, responsibilities, and relationships of its structure for a simple reason—it is the superior format for doing so. It sets a clear chain of command, functional span of control, effective allocation of authority, and precise assignment of tasks. It specifies...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old...
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old man of Scandinavian descent was rushed to the Emergency Room of your local hospital after a family member discovered him unconscious in his home. The woman who dialed “911” told the dispatcher that the man, her brother, was the local librarian of the past 10 years and had no spouse or children. She reported that they had spoken the day before, and he had...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From the April 2004 Issue Save Share 8.95 In 1991, Progressive Insurance, an automobile insurer based in Mayfield Village, Ohio, had approximately $1.3 billion in sales. By 2002, that figure had grown to $9.5 billion. What fashionable strategies did Progressive employ to achieve sevenfold growth in just over a decade? Was it positioned in a high-growth industry? Hardly. Auto insurance is a mature, 100-year-old industry...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT