Question: Project 1 Measurement Class and Dimensional Analysis Due Date: 0 9 . 2 6 . 2 0 2 4 Artifact: Zip File with Complete Project

Project 1 Measurement Class and Dimensional Analysis
Due Date: 09.26.2024
Artifact: Zip File with Complete Project
Design and implementation of a measurement class that has a nice interface which includes the
ability to add, subtract, multiply and divide measurement objects. Also support for the
measurement class and iostream class must be designed and implemented. Your measurement
class must account for unit types. That is your measurement class must encapsulate a magnitude
and a unit component. The unit component for this version of the measurement class must
encapsulate:
millimeters, centimeters, meters, kilometers
milliliters, centiliters, liters, kiloliters,
milligrams, centigrams, grams, kilograms
seconds, minutes, hours
The measurement class must support the following operators:
+-*/<>==
inserters ->>
extractors -<<
=
(Hint see pages 74 thru 81 Main & Savitch)
The measurement class must include but is not limited to the following member functions:
constructor (Hint see pages 45 thru 49 Main & Savitch)
copy constructor
destructor
unitTest
Each method must have pre condition and post condition tests (Hint see pages 6 & 7 of Main &
Savitch)
Measurement Objects Interactions (Implementation Model).
Your measurement class and the corresponding measurement objects will be used to interact with 2
text files. The files are named year1measurements.txt and year2measurements.txt.
Each file will consist of 687 measurements, units for those measurements, and operations on those
measurements. There will be 687 lines in each text file. Each line will have the following format:
Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8
Measurement 1 Unit Operator Measurement 2 Unit Operator Measurement 3 Unit
Examples:
345.3321 centimeters +3.5 meters /14569609 millimeters
458.3 meters /50 seconds /5 grams
Each line represents a sensor measurement to the message object. The message object must provide
the proper response to each message by performing the calculation in the message and inserting the
appropriate response into an iostream object. Note there will be 2 files each with 687 messages,
therefore your message object will have to generate at least 1,374 response messages. Your message
object must present 1 set of response messages in the order that message was received from the text
file. Your message object must also present the 1,374 response in ascending order accompanied by
their original position in the sensor measurement file. In addition to these 2 list of messages, your
message object must supply the mean, mode, and median of your responses considering the
original unordered list.
Recap of the artifacts your message object must produce
Four lists of responses, 2 for each file. Two lists will be responses in the order of the sensor
measurements in each file. Two lists will be the responses in ascending order with each
response accompanied by its position in the original file.
The mean of the responses for year1measurements.txt
The mean of the responses for year2 measurements.txt
The mode of the responses for year1measurments.txt
The mode of the responses for year2measurments.txt
The median of the responses for year1measurments.txt
The median of the responses for year2measurements.txt
What To Turn In:
1 file containing the four lists, the 2 means, 2 modes, and 2 medians for the measurements. Note: I
will show you how to create this file in class. But for the curious here is a hint:
./your_program > measurement_report.txt
The measurement objects interactions represent the implementation model.
1 file containing:
Mathematical Model
IPO Chart
FSM (Finite State Machine)
Mathematical Structure(S,R,O,P)
1 file containing
Engineering Model
Use Case Diagram
Class Relationship Diagram
Implementation Model
.h files
.cpp files
2 test files (1 for each year)
1 file containing
Application Model
measurement_report.txt file
Summary of files to turn in
Model Files
Mathematical Model IPO, Finite State Machine, Mathematic Structure
Engineering Model Class Relationship Diagram, Use Case Diagram
Implementation Model .h files and .cpp files 2 test files.txt
Application Model measurement_report.txt
File formats all diagrams provide in jpeg or png formats. All other files must be in plain text
format (no docx files!). Please zip files and name the zip file with your
lastname.firstname_project#. e.g

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!