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

  Determine one number missing from the sequence

Certain major software corporation likes to use in their interviews. Like many algorithm design problems, there are many possible answers, but I have presented one of the more generally accepted ones.

  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)?

  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?

  Implement relationship between employees and projects

Assume further each employee has unique EmployeeNum and each project has unique ProjectNum. Describe how you would implement relationship between employees and projects in each of given scenarios.

  Explanations on spreadsheet concepts

A workbook can contain more than one worksheet. Provide an example of a spreadsheet application where it would be necessary to have more than one worksheet, can you describe how that works?

  Importance of udp and the relationship to tcp

Discuss and explain what the UDP does and its relationship to TCP in what ways is it similar and different, and why would we use UDP, and why can not a user program access IP directly?

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Developing soa based it solutions

This Discussion will focus on the different levels of abstractions within the service interface layer and importance of abstraction and role of layering when constructing SOA-based IT solutions.

  Determine order that breadth first search will expand nodes

Determine the order that breadth first search will expand the nodes? S,A,B,D,C,E,G. What is the order that depth first search will expand nodes? S,B,E,F,D,G

  Draw e-r diagram for doctors prescribe drugs for patients

Draw an E/R diagram for the following situation: Doctors prescribe drugs for patients. A given doctor can prescribe many drugs for a certain patient.

  Er diagram to monitor students-write desirable constraints

Represent entire scenario with the help of ER Diagram. Also write desirable constraints and justify your design approach even in a single small step.

  Specify the entity-relationship diagram for database

Specify the entity-relationship diagram for this database. Do not forget to underline main attributes and include arrowheads indicating multiplicity of relationships.

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