Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

COIT20245 Console Application that Supports Simple Map Analysis Project

COIT20245 Console Application that Supports Simple Map Analysis Project

COIT20245 Console Application that Supports Simple Map Analysis Project

The raw data to be analysed is to be stored in 3 arrays. Use array initialisers to specify initial values of your choosing. The 3 arrays are to contain person identifiers (string values), systolic blood pressure (SBP) and diastolic blood pressure (DSP). Both SBP and DSP are to be specified as int values. MAP is determined from an individual’s blood pressure using the following formula:
MAP = 1.0/3.0 * SBP + 2.0/3.0 * DBP
The raw data is to be used to create objects of type Record, which are to be stored in an array of type Record. The Record class is to conform to the class shown in the UML Diagram below:
Figure 1. Class Diagram
Note that in Figure 1, the visibility of class methods and attributes are designated as + (public) and – (private). Associations are annotated with a label (for readability) and multiplicity. The multiplicity captures the number of object instances that can be involved in the association. In this case, only two values apply – 1 and *, which means many.
While map is calculated as a floating point value, it is to be stored as an int value. In addition to the map attribute, Record also has a category attribute, which has values of “high”, “medium” and “low”. A normal mean arterial pressure is a value in the range 70 and 100 mmHg inclusive.
Category determination is to be provided as a separate (private) method called classify(). Creation of the Record array is to occur when the MAPAnalyser object is created, using a private method called loadFromTables(). This method will iterate through three separate arrays containing ids, systolic blood pressures and diastolic blood pressures, construct Record objects and add them to the data array. Populate these arrays using array initializers. In order to facilitate search, records are to be maintained in ascending order of person id. Sorting is to be done after record creation, using a private method called sortById(). This method must implement the selection sort algorithm. Both loadFromTables() and sortById() are to be invoked from the constructor for the MAPAnalyser class.
The application’s View class is to execute (using a switch statement) the following command options:
Display the record for a specified person
Display records for all persons with MAP values within a specified range.
Display the minimum, maximum and median MAP values
Exit the application
As it is a console application, the user will need to be prompted to enter a command and its arguments (if any). My personal preference is for a minimal interaction scheme, as shown below:
run:
The following commands are recognised
Display this message> 0
Display a specific subject record:> 1 id
Display records for all subject records within a range > 2 map1 map2
Display statistics (minimum, maximum and median)> 3
Exit the application> 9
> 1 S01

>
Feel free to adopt the above scheme or if you prefer, implement a more verbose interaction scheme.
Note that
Each command is designated a number
Command 1 requires a single argument – the subject id
Command 2 requires 2 arguments – the lower and upper bounds of a range of MAP values.
I have added a “help” command (command 0)
The command options are displayed at the start of the application and whenever a “help” command is entered, rather than after each command.
Records are displayed (with no explanation of the fields) using Record.toString()
For a sorted list of values, if the number of values is odd, the median is the middle value. If the number of values is even, the median is the average of the two middle values.
For the commands that require arguments note that
For commands 1 and 2, basic error checking is expected.For command 1, an error message is to be displayed if an id does not exist. For command 2, an error message is to be displayed if a member of the range is < 0 or > 200 or if the second member of a range is less than the first member.

“Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results.”
Attachments
20190517111333assignment2_v2 (50 kB)

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Homework Discussion only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Homework Discussion are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Homework Discussion is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Homework Discussion, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.