Franois looks for groups of artifacts. He has asked you to create a program that allows...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
François looks for groups of artifacts. He has asked you to create a program that allows him to type in the number of artifacts he finds (assume they always enter at least one). The program should have the following functionality: It allows him to enter the artifact types and their assumed values (form: two inputs separated by a space-assume they always enter this form correctly). YOU CAN ASSUME VALUES ARE INTS NOT DOUBLES) IF YOU WOULD LIKE • It allows him to pick an Index (for the array-assume they always enter a valid index) It allows him to pick a price that that would make an artifact valuable The program should then check if the artifact at the chosen Index would be considered valuable (using the price given). This should just happen once (not continuously) YOU MUST CREATE AND USE BOTH METHODS BELOW IN YOUR PROGRAM-AUTOMATICO IF YOU DO NOT. /"This method should return a String array with all artifacts and their assumed values (in the form: artifact value, separated by a space). 7 public static String[] artifactsEnter) /"This method should take a String (in the form: artifact value, separated by a space) and check if the assumed value of the artifact is less is less than val_price (the second parameter). It should return false if the artifact is not valuable, true if it is." public static boolean isValuable(Strings, int val pricel public static String [] artifactsEnter() /*This method should take a String (in the form: artifact value, separated by a space) and check if the assumed value of the artifact is less is less than val price (the second parameter). It should return false if the artifact is not valuable. true if it is.:"/ public static boolean is Valuable(Strings, int val_price) Sample Run: How many artifacts? 3 Enter artifact 1 and expected value (separated by space): Jar 500 Enter artifact 2 and expected value (separated by space): coin 1000 Enter artifact 3 and expected value (separated by space): statue 5000 Pick an index: 1 -Pick a price that would make the artifact valuable: 2000 François looks for groups of artifacts. He has asked you to create a program that allows him to type in the number of artifacts he finds (assume they always enter at least one). The program should have the following functionality: It allows him to enter the artifact types and their assumed values (form: two inputs separated by a space-assume they always enter this form correctly). YOU CAN ASSUME VALUES ARE INTS NOT DOUBLES) IF YOU WOULD LIKE • It allows him to pick an Index (for the array-assume they always enter a valid index) It allows him to pick a price that that would make an artifact valuable The program should then check if the artifact at the chosen Index would be considered valuable (using the price given). This should just happen once (not continuously) YOU MUST CREATE AND USE BOTH METHODS BELOW IN YOUR PROGRAM-AUTOMATICO IF YOU DO NOT. /"This method should return a String array with all artifacts and their assumed values (in the form: artifact value, separated by a space). 7 public static String[] artifactsEnter) /"This method should take a String (in the form: artifact value, separated by a space) and check if the assumed value of the artifact is less is less than val_price (the second parameter). It should return false if the artifact is not valuable, true if it is." public static boolean isValuable(Strings, int val pricel public static String [] artifactsEnter() /*This method should take a String (in the form: artifact value, separated by a space) and check if the assumed value of the artifact is less is less than val price (the second parameter). It should return false if the artifact is not valuable. true if it is.:"/ public static boolean is Valuable(Strings, int val_price) Sample Run: How many artifacts? 3 Enter artifact 1 and expected value (separated by space): Jar 500 Enter artifact 2 and expected value (separated by space): coin 1000 Enter artifact 3 and expected value (separated by space): statue 5000 Pick an index: 1 -Pick a price that would make the artifact valuable: 2000
Expert Answer:
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
Which functional activities are the most closely related to operations managers' attempts to manage the flow of materials and information in a firm?
-
BACKGROUND You are an information analyst working for NEE. The company president has asked you to prepare a Quantitative analysis of financial, sales, and operations data to help determine which...
-
You have completed your first meeting with Harper and Riley Evans. You are confident that you now have most of the information you will need to prepare a comprehensive financial plan for them. Beyond...
-
Use a calculator to evaluate an ordinary annuity formula \[A=m\left[\frac{\left(1+\frac{r}{n}ight)^{n t}-1}{\frac{r}{n}}ight]\] for \(m, r\), and \(t\) (respectively) given in Problems 7-22. Assume...
-
In below Exercises, find the areas of the shaded regions under the given normal curves. 1. 2. 10 4 3.5 4.5
-
On October 1, 2011, the Submarine Sandwich Company entered into a franchise agreement with an individual. In exchange for an initial franchise fee of $300,000, Submarine will provide initial services...
-
In addressing control procedures for prepaid insurance, which of the following controls would not be relevant to the auditor? a. Controls over purchase cutoff. b. Controls over the acquisition of new...
-
During the year ended June 30, 2012, the following transactions were recorded by St. Anns College, a private institution: 1. Tuition and fees amounted to $6,800,000, of which $4,500,000 was received...
-
How security officials determine vulnerabilities to natural, human-made, and technological threats. Also, listsocio-economic and criminal activity factors associated with the environment surrounding...
-
Nancy Nanny opened a child-care facility on January 1, Year 1. Use the Chart of Accounts below to complete the requirements on the following pages for Nancy Nanny Child Care. NANCY NANNY CHILD...
-
Wilco acquires 3,000 of the 10,000 shares of Seminole Corporation on January 1, 2022, for $900,000. Seminole reports $500,000 of net income in 2022 and paid $50,000 in dividends. What amount of...
-
Evaluate the following subject lines. Is one subject line in each group clearly best? Or does the best line depend on company culture, whether the message is a paper memo or an email message, or on...
-
Rewrite the following negative message so it follows the guidelines for negative messages: Dear Valued Employee: I'm afraid the company will not be able to grant you your requested vacation time at...
-
Three days ago, one of your subordinates forwarded to everyone in the office a bit of email humor hed received from a friend. Titled You know youre Southern when . . . , the message poked fun at...
-
Repeat problem 15 by assuming Data From Problem 15: The boundaryvalue problem for a cantilevered beam can be written as w(x)=c(x)=cx+2x+03x4 i=1
-
The shape functions of a linear 3node element are also called barycentric or area coordinates because they uniquely define the location of a point in the triangle. Show that the shape functions in...
-
Which Data Analysis Toolpak tool would be most useful in predicting the level of sales a firm will experience, given its investment in advertising expense? If we were trying to see if the amount...
-
Write the statement to store the contents of the txtAge control in an Integer variable named intAge.
-
Explain the principle of stare decisis.
-
Oahe Enterprises was formed by the efforts of Emmick, who acted as a promoter and contributed shares of Colonial Manors, Inc. (CM), stock in exchange for stock in Oahe. The CM stock had been valued...
-
The police obtained a search warrant based on an affidavit that contained the following allegations: (a) Donald was seen crossing a State line on four occasions during a five-day period and going to...
-
Use the code given earlier for R to make this plot. The command would be plot(percentage)
-
Why would you not feel comfortable computing a Pearson correlation on the data in Exercise 9.10? Exercise 9.10 Down syndrome is another problem that psychologists deal with. It has been proposed that...
-
In Exercise 9.1 the percentage of mothers over 40 does not appear to be important, and yet it is a risk factor in other societies. Why do you think that this might be? Exercise 9.1 In Sub-Saharan...
Study smarter with the SolutionInn App