Formula for calculating daily recommended calories

Assignment Help Software Engineering
Reference no: EM13920290

Assignment-

Objectives - You are required to document, test and refactor an existing application.

Introduction-

The UB Health Services is a medium size hospital capable of handling few tens of patients. The hospital is to develop diet control software for the patients who are recovering from their illness. In the current scenario, the hospital does have software, capable of finding the diet requirement for a given patient. However, the existing software is poorly designed and developed by the previous IT team. You have joined this hospital as multifaceted IT person who has capacity to play dual roles - as a system analyst and as a developer.

In UB Health Services, you are given an application for calculating the recommended daily intake of calories. The application has the following general requirements:

1. The application has the formula for calculating daily recommended calories and the calculation is based on the patient's personal data and it varies according to the patient's gender. Here are the formulas:

Male: 66 + (6.3 × body weight in lbs.) + (12.9 × height in inches) - (6.8 × age in years)

Female: 655 + (4.3 × weight in lbs.) + (4.7 × height in inches) - (4.7 × age in years)

2. The application is also required to calculate an ideal-weight. The idea was for the application to be able to calculate a patient's ideal weight based on height, along with calculating daily calories. As before, the calculation depends on gender, so there are separate formulas for men and women. Here are the formulas:

Male: 50 + 2.3 kg per inch over 5 feet

Female: 45.5 + 2.3 kg per inch over 5 feet

3. The next requirement is to save patient historical data so that doctors could easily track his patients' progress. Therefore, for this requirement, application needed to capture some data that could be used to identify the patient.

4. Identification of the patient by using Medicare number.

5. Separation of the calculation operation and the operation of persisting patient data: These two actions should be separated to be able to perform some ad hoc calculations without having to input a patient's name and Medicare number. In addition, users could save the data only when they were sure that all the entries were correct.

6. For implementing persistence of a patient's history, a few alternatives are available, such as a flat file, a database (e.g., Access), or even a spreadsheet. In the given application, a flat file was used. You are required to change this to a database or XML file.
The system analyst role is to design and analysis the requirements by drawing a use case diagram, class diagram and sequence diagram for finding the correct diet intake in calories for a given patient. While the developer role is to produce the code, however, in this scenario, you have given the written code for the application developed by the previous IT team. This application is badly in need of refactoring and even a casual viewing of the source code reveals many examples of the "code smells" (talked about in Fowler's book). You are only required to refactor the written code and test them based on the analysis and design produced by you as a system analyst. Finally, a report is given to the management about the defects in the design of the existing software by identifying the bad smells etc.

Your report should be written in the same manner as Fowler has done in the prescribed text - small refactoring's with code comparisons and UML diagrams (refer Fowler pp.1-65). Ask your tutor if you have any doubts.

Assignment-

A mark is awarded for each of the sections shown. Within each section, items affecting the category mark are listed.

Report detailing any "code smells" present in the code, and how you intend to refactor them out of the application. Your report should be complete and follow the guidelines for the presentation of academic work. The style of your report should be the same as that used by Fowler in his book ‘Refactoring'.

A refactored version of the system eliminating all identified code smells present in the initial code.

A class diagram illustrating the initial code and another class diagram illustrating the final refactored code (including all relevant dependencies).

A sequence diagram illustrating how the final refactored system processes a new patient's recommended daily intake of calories

Extensive NUnit tests for the complete refactored system.

Reference no: EM13920290

Questions Cloud

Calculate planning and operational variances for sale volume : PG budgeted sales for 20X8 were 5,000 units. The standard contribution is $9.60 per unit. Calculate planning and operational variances for sales volume.
Pay and employment practices common in japan : 1. Compare and contrast the pay and employment practices common in Japan with the pay and employment practices common in Germany.
Security authentication in todays business world : Security authentication is a hot topic in today's business world. However, many people may have differing ideas when it comes to what security authentication actually is. This paper will address those perceptions in a straightforward and easy to u..
Data for making intelligent business decisions : Businesses today are extremely reliant on large amounts of data for making intelligent business decisions. Likewise, the data warehouses are often structured in a manner that optimizes processing large amounts of data.
Formula for calculating daily recommended calories : The application has the formula for calculating daily recommended calories and the calculation is based on the patient's personal data and it varies according to the patient's gender. Here are the formulas
Produce the original budget and a revised budget allowing : A company produces Widgets and Splodgets which are fairly standardised products. Produce the original budget and a revised budget allowing for controllable factors in a suitable format.
Creating a normobaric hypoxic environment : In his paper on altitude simulation, Daniel found one source that explained that "creating a simulated altitude can be accomplished through creating a normobaric hypoxic environment. "  In his paper, Daniel uses the phrase "normobaric hypoxic envi..
Statements of the rules of debit : 1) Which of the following entries would be used to record the billing of fees earned? 2) If total liabilities are $1,000 and total assets are $8,000, owner's equity must be:
Peoria best coffee house extra credit raw : Bob Roaster, the vice president for sales at Peoria's Best Coffee Houses (located in suburban Prescott Florida) is considering expanding this company's chain of coffee houses to Tallahassee. But before he can commit to opening one or two stores i..

Reviews

Write a Review

Software Engineering Questions & Answers

  Early cloud adopters in federal government

Despite slow adoption government-wide, five agencies have paved the way for others implementing cloud computing.- The five agencies are GSA, The Department of Interior (DOI), The Department of Agriculture (USDA), NASA, and The National Oceanic and ..

  Web site distinguish between lack of capacity and a denial-o

a web site distinguish between lack of capacity and a denial-of-service attack? For example, web sites often experience a tremendous increase in volume of traffic right after an advertisement with the site's URL

  Find various life cycle models

In software engineering, one can find various life cycle models. Some examples include the waterfall model, agile processes, and iterative and incremental models. Research at least five (5) current and representative life cycle models

  Software as a service

From the e-Activity, describe two requirements of the software as service and the subscription economy as outlined in the Forbes article. Explain how your selected requirements affect the subscription business model.

  Sketch er diagram for buying antiques

Sketch the ER diagram for following situation (State any assumptions you believe you have to make to develop complete diagram): Stillwater antiques buys and sells one-of-a-kind antiques of all kinds

  Develop an erd for a library

What are the main steps to perform when identifying business requirements using the use case approach and describe how an organization's structure and culture affect the design of an information system.

  Produce a software design specification document

Complete the template as best as you can. Make any reasonable assumptions based on your understanding of the problem that allow you to address as many sections of the SDD template as possible.

  Create pseudocode to compute produce sale

Suppose that all products are priced per pound. As soon as program starts, it should prompt for and get the prices of those products.

  Functional specifications for the software

When looking at a need for a change or improvement in a current system, what are two of the most important processes to examine and explain your answer.

  Diffie hellman key agreement

Assume that users Alice and Bob carry out the Diffie-Hellman key agreement protocol with p = 50147 and g = 5. Assume that Alice chooses x = 1367 and Bob chooses y = 3789.

  Explain an efficient parallel algorithm

Think about an n-element list in an n-processor EREW parallel random-access machine, where some elements of the list are marked as being blue.

  You will apply the basic steps of the sdlc to building the

identify and document a full information system for a small company. you will apply the basic steps of the sdlc to

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