Question

Write program in JAVA for the scenario below Scenario: North Carolina Medical Supply is researching purchasing...

Write program in JAVA for the scenario below

Scenario: North Carolina Medical Supply is researching purchasing Ram, a surgical robot. They have gathered data from several sources and need you to write a program to arrange this data in a report. They want to know what is the average rating for Ram, which users have given Ram above average ratings, and which companies rated Rams below average. They also want to know the cost per Ram, since they have noticed a difference in price based on the number of robots purchased.

Sample Data:

Name of Company                            # of Robots                   Cost (No tax included)                            Rating

Davis Inc.                                                15                                        $250, 000                               Below Average

Belk Medical Inc.                                    30                                     $450, 000                                Above Average

Jackson   Surgical Inc.                            3                                        $75, 000                                  Below Average

Baptist Medical Center                           50                                      $500, 000                             Above Average

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOURCE CODE IN JAVA:

class Main

{

public static void main(String[] args)

{

//storing data in arrays

String companies[]=new String[]{"Davis Inc.","Belk Medical Inc.","Jackson Surgical Inc.","Baptist Medical Center"};

int numberOfRobots[]=new int[]{15,30,3,15};

double cost[]=new double[]{250000,450000,75000,500000};

String ratings[]=new String[]{"Below Average","Above Average","Below Average","Above Average"};

//finding and displaying companies with below average rating

System.out.println("Companies with below average rated Ram: ");

for(int i=0;i<companies.length;i++)

{

if(ratings[i].equals("Below Average"))

System.out.println(companies[i]);

}

System.out.println();

//finding and displaying companies with above average rating

System.out.println("Companies with above average rated Ram: ");

for(int i=0;i<companies.length;i++)

{

if(ratings[i].equals("Above Average"))

System.out.println(companies[i]);

}

System.out.println();

//finding and displaying cost per robot for every Company

System.out.println("Cost per robot for every Company:");

for(int i=0;i<companies.length;i++)

{

System.out.printf("%24s - $%.2f\n",companies[i],cost[i]/numberOfRobots[i]);

}

}

}

OUTPUT:

Add a comment
Know the answer?
Add Answer to:
Write program in JAVA for the scenario below Scenario: North Carolina Medical Supply is researching purchasing...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use Java programing Write a program to display information about schools in North Carolina that offer...

    Use Java programing Write a program to display information about schools in North Carolina that offer a BS in Computer Science. The data file "NCuniversity Data dat" contains the following information on each line: BS in CS Instate cost Out of state cost int int int double fraction of students who return after first year String name of the school 0-no, 1-yes, 2-online only Expected annual cost for an in-state student Expected annual cost for an out of state student...

  • BUSINESS COMMUNICATION Please write an e-mail according to the scenario below. Remember to use an appropriate...

    BUSINESS COMMUNICATION Please write an e-mail according to the scenario below. Remember to use an appropriate subject line, Do your best to strike the right tone. As the manager of Reprographic Services, write an e-mail message to Alicia Rodriguez, manager, Technical Services. You are very worried that one of the computers of your operators may be infected with a virus. The computer belongs to Jackie Jimenez. Jackie says that each time she opens a previously stored document in her Word...

  • Please write it in Java language 2. (Myinterface.java) The program description below was found waaaaay back...

    Please write it in Java language 2. (Myinterface.java) The program description below was found waaaaay back in the archives of the Equinox history database. It is the specification for a simply "computer store storefront". Even though computer stores are now extinct, you find the idea charming and decide to use the specification as inspiration to write an interface for one of the Equinox systems. Read carefully: write your own GUI for one of the Equinox systems, drawing inspiration from the...

  • Please use Java to write the program The purpose of this lab is to practice using...

    Please use Java to write the program The purpose of this lab is to practice using inheritance and polymorphism. We need a set of classes for an Insurance company. Insurance companies offer many different types of policies: car, homeowners, flood, earthquake, health, etc. Insurance policies have a lot of data and behavior in common. But they also have differences. You want to build each insurance policy class so that you can reuse as much code as possible. Avoid duplicating code....

  • This is a java homework for my java class. Write a program to perform statistical analysis...

    This is a java homework for my java class. Write a program to perform statistical analysis of scores for a class of students.The class may have up to 40 students.There are five quizzes during the term. Each student is identified by a four-digit student ID number. The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is...

  • Write a C program code for the scenerio below: An important device carried up to the...

    Write a C program code for the scenerio below: An important device carried up to the International Space Station on the last scheduled flight of space shuttle Endeavor was the Alpha Magnetic Spectrometer (AMS-02). As explained by NASA, the AMS is a particle physics detector, searching for antimatter and dark matter and also measuring cosmic rays. The name strangelets refers to three types of quarks (named u, d or s) which have been discovered experimentally to make up matter, but...

  • in java PART ONE ================================================== Write a program that will read employee earnings data from an...

    in java PART ONE ================================================== Write a program that will read employee earnings data from an external file and then sort and display that data. Copy and paste the input file data below into an external file, which your program will then read. You will want to use parallel arrays for this program. Modify the select sort algorithm to receive both arrays as parameters as well as the size of the arrays. Use the algorithm to sort your earnings array....

  • Write in java language ================== Office Supplies Inc., an office supply store, services many customers. As...

    Write in java language ================== Office Supplies Inc., an office supply store, services many customers. As customers’ orders for office supplies are shipped, information is entered into a file. Office Supplies bills their customers once each month. At the end of each month, the Chief Executive Officer requests a report of all customers sorted by their customer id (from lowest to highest). The report includes their bill balance and tax liability. Write a program to produce the outstanding balance report...

  • Python program This assignment requires you to write a single large program. I have broken it...

    Python program This assignment requires you to write a single large program. I have broken it into two parts below as a suggestion for how to approach writing the code. Please turn in one program file. Sentiment Analysis is a Big Data problem which seeks to determine the general attitude of a writer given some text they have written. For instance, we would like to have a program that could look at the text "The film was a breath of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT