Question about ranges and functions

Assignment Help Software Engineering
Reference no: EM1379040

Question: Assume you have functions that you want to call for many individual year values, as well as ranges of years, and you are deciding on whether to use an if statement or a switch statement. The ranges and functions are:

o 1900 to 1969 - functionA()

o 1969 to 2000 - functionB()

o 2001 - functionC()

o 2002, 2003 - functionD()

o 2004 and beyond - functionE()

Do you think it would be better to set this up as an if statement, a switch statement, or a combination? Write the code if it helps to explain your answer.

 

Reference no: EM1379040

Questions Cloud

Assembly language programming code for 8086 : Change any binary number found in register AX to equivalent ASCII code for each hexadecimal nibble in AX.
Improve the poorly constructed communications : Suggest methods that could improve the poorly constructed communications, with reference to the theory and choose two of these communications that you feel were well constructed or were able to get the message across and analyse why this was the c..
Question about consecutive bytes : Determine the address where the longest consecutively numbered string of bytes starts. Consecutive bytes are defined as those that differ through the number 01.
Object oriented system design with uml : Provid with initial needs collected at the first interview with the owner of a video rental store, who is ordering an data system to improve efficiency of his business.
Question about ranges and functions : Assume you have functions that you want to call for many individual year values, as well as ranges of years, and you are deciding on whether to use an if statement or a switch statement.
Conducting unit testing of code : Suppose you are writing a program and you will start to conduct testing on your code as it becomes completed and operational. This is generally called unit testing.
Analyzing code snippet : Analyze the code snippet and describe why it will work or why not it will not. Code required to make this a complete program intentionally left out.
Question related to inheritance : Inheritance is a method in object oriented programming in which you derive new classes from existing classes in your code. Explain why might this be useful?
Question about inheritance : In computer programming would you say that a function could also be called an inheritance item due to the reuse of it in the program?

Reviews

Write a Review

Software Engineering Questions & Answers

  Preparing final table list and rationale

Assume you are now going to construct the final table list for Fernando's Skate Shop. Use the following preliminary field list and list of subjects to get started.

  Create logic for program that will produce count of readers

Create the logic for a program that would produce a count of readers by income groups as follows: under $20,000, $20,000- $29,999, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.

  Designing flowchart for wholesale company

Design a flowchart to depict each situation. An individual from a wholesale company needs to prepare five copies of sales.

  Use e-r approach to model operations of local library

Use the E-R approach to model the operations of your local community library. The library has books, CDs, tapes, and so forth, which are lent to library patrons.

  What problems project team encounter project-s life cycle

What are some of the typical problems a project team may encounter during a project's life cycle? How can they be resolved? Explain.

  Write business rules that are reflected in erd

Write the business rules that are reflected in the ERD.(Note that the ERD reflects some simplifying assumptions. For example,each book is written by only one author.

  Design pseudocode and flowchart for swallowing a pill

Write a solution in pseudocode for swallowing a pill. Translate solution into flowchart. Write about which tool they like best and why? Which tool do they think would be easiest to learn?

  Describe five forces of porter-s competitive forces model

Describe each of the five forces of Porter's competitive forces model and explain how Internet impacts each one. List and explain each of the six steps of knowledge management system cycle.

  Draw flowchart to compute the sum of series

Draw a flowchart to calculate the sum of 3+6+9+....+36. Then code the problem using C++programming language. Draw a flowchart to print 3,6,9,....36 Then code the logic using C++ programming language

  Element of array

Discuss how do you access the element of array a located at row two and column four?

  Creating context diagram for new system

Create a context diagram for new system. Create a diagram 0 DFD for new system. Write brief memo that describes the significance of leveling a set of DFDs.

  Draw aoa network diagram representing project

Draw a AOA network diagram representing the project. Put the node numbers in circles and draw arrows from node to node, labeling each arrow with the activity letter.

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