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

  Create and annotate class hierarchy for types of faculty

Create and annotate a class hierarchy to represent various types of faculty at a university. Show what characteristics would be represented in various classes of hierarchy.

  What project management tool shows dependency

What project management tool demonstrates dependency between phases of project (what should be completed before something else can be completed)?

  C++ definitions

Mr. Oldie wishes to share his wisdom too, but on a different topic: "These OO-guys looked at hardware assembly and car assembly mechanisms and dreamed that they can do it in software.

  Finding example of source code

Discover one example of each label in the following source code and write the line number of the example next to the label.

  Explain the action of the function

Explain the action of the function. Determine the function in the library that performs a similar calculation?

  Draw e-r diagram for courses offered by college

Prerequisite for any number of courses, or may not be prerequisite for any other course. Draw an E-R diagram for this situation. Clearly state the assumptions made.

  Difference between encapsulation and information hiding

Discuss and explain the difference between encapsulation and information hiding. In addition, describe the role both of these concepts play in helping to make designs more robust and extensible.

  End users must be involved in database design in a limit

End users must be involved in database design, but only to  degree. What are you are your toughts do you agree or did agree why or why not.

  Differentiate between latency and jitter

Describe in details about the Systems Development Life Cycle Costs Differentiate between latency and Jitter The Protocol for Message Standards is divided into three important parts. Briefly describe each one

  Difference between private, public and protected variables

Difference between private, public and protected variables

  Draw erd for student entity

Draw and ERD for this situation. What attribute or attributes did you designate as the identifier for the STUDENT entity? Why?

  Designing e-r diagram for each product at pvf

Suppose that at PVF, each product. Design E-R diagram for this situation and state minimum and maximum cardinalities on the diagram.

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