Create the metric distance program

Assignment Help JAVA Programming
Reference no: EM131465087

Assignment

Metric Distance

Create the Metric Distance (MD) Program. What is a "metric distance". Given a set of metrics, m1, m2, m3... mn, for a set of modules (records), determine the similarity (distance) among the modules in the set by comparing the individual values of the n metrics. The output will be the smallest distances between all records.

Input to the program will be a file (MD_input_file) in following text format:

• Number_of records Number_of_metrics - the first line of the input file determines the size of the input file - note they are integers.

• The rest of the file will be individual records beginning with the module name followed by values for each of the number of metrics. Each module name should be distinct for our testing so that final outputs can be easily compared. Note in reality this is not a hard rule, because depending on scope names can be reused in programs.

Error processing and error reporting should be handled by one module, MD_error(char *message, enum type, int severity);

For example in checking the format of the first line of MD_input_file, if the first line does not contain two integers, report the error,

Misspellings in the error message will be counted as an error!

MD_error("Error, expecting the number of records and number of metrics for each record", FILE_FORMAT_ERROR, PROGRAM_EXIT).

Analyze the types of errors that can occur in your program and create an enumerated type for each. For severity, basically there are two types, one that has the program stop (PROGRAM_EXIT) and one that reports the error and then continues, PROGRAM_CONTINUE).

For the "body" of the file, if a record does not contain the correct number of fields, one field for the name of module (realize the name can be a list of digits) followed by the correct number of metrics, report the number of the incorrect record and a message indicating incorrect format). The message should indicate the problem, so it can be corrected the user.

If the file does not contain the correct number of records, this is also an error. Again indicate the number of records read and the number expected.

Reference no: EM131465087

Questions Cloud

Would you rather live in a period of inflation : Would you rather live in a period of inflation (plentiful jobs but hugely inflated prices, loss of value for the dollar) or deflation.
Explain how an oral presentation differ from research report : What role do verbatim quotes play in qualitative research reports? Explain the purpose of coding and discuss how it differs between quantitative.
Create a testing program thats achive five type of testing : Create a testing program that achive five type of testing which are : * equivalence coverage. *Data coverage. *error guessing. *branch coverage. *T way testing.
Explain the skills-knowledge-education and experience : Explain the skills, knowledge, education, and experience that you will require of the store employees.
Create the metric distance program : Create the Metric Distance (MD) Program. What is a "metric distance". Given a set of metrics, m1, m2, m3... mn, for a set of modules (records).
Structure of the building and construction industry : Identify the market structure of the building and construction industry in your country. Outline the solutions to the housing affordability problem.
Create a cost-benefit analysis spreadsheet : ACCT6001 Accounting Information Systems Assessment: Excel Spreadsheet. Create a cost-benefit analysis spreadsheet
What makes a good sales manager : Do you have any thoughts on what makes a good sales manager?
Describe specific qualitative methods : Describe specific qualitative methods and tools that could be used within your discipline to gather data. Within your description, evaluate their effectiveness.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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