Reference no: EM13884710
Call each of the four from the Unit6Quiz.java main method.
Problems:
1. Write a method called playListBuilder that takes no parameters and returns an ArrayList of Strings.
In the method body, declare an ArrayList of Strings called playList and populate it with songs (Strings) using input from the user at the command line.
The user can enter as many songs as they like. Use a sentinel to allow the user to indicate when they are finished.
Don't forget to include a prompt.
2. Write a method called searchPlayList that takes an ArrayList of Strings as a parameter (the playList) and returns an integer.
In the method body, prompt the user to enter a search term (a String), then count how many times the search term appears
in the playlist ArrayList. (Hint: use the String.contains() method to check each String in the playList)
The method returns the count. Note the next two methods are unrelated to the playList methods above.
3. Write a method called getVitalSigns The method takes no parameters and returns an array of three ints. Call this array vitals.
The method gets three values from the user: heart rate, systolic blood pressure, and respirations.
Prompt for each of them. The three values are
stored in positions 0, 1, and 2 of the vitals array.
4. Write a method called checkVitals that takes an array of ints (the vitals array from #3 above)
as a parameter and has no return value.
The method uses the vitals array and the following table of rules to make an
assessment of the patient's condition (these are simplifications). Remember that heart rate, systolic blood pressure,
and respirations are stored in positions 0, 1, and 2 of the vitals array.
Normal RangeLow ConditionHigh Condition
Heart Rate 60-100 BradycardiaTachycardia
Systolic Blood Pressure90-120 HypotensionHypertension
Respirations 12-20 BradypneaTachypnea
After using the vitals array values to decide each of the conditions,
output the condition statements to the command line as in this example:
Heart Rate: NormalBlood Pressure: HypertensionRespirations: Normal
5. Call each of the four methods above from the main method in Unit6Quiz.java
Preparing a table that compares actual and budgeted values
: Honey Bear Confections is a small company dedicated to making bear-shaped sweets with honey as a sugar substitute. The problem related to Basic Accounting and it this problem preparing a table that compares actual and budgeted values of production a..
|
A university has the following dormitories
: A university has the following dormitories: Allen Hall $1,500 persemester Pike Hall $1,600 persemester
|
Differential method of analysis
: Explain the Integral and Differential method of analysis for finding the rate of reaction.(May-2005)2.For the elementary reaction in series Ak1Rk2S if k1= k2and at t = 0, CA= CAoandCRo= CSo= 0, find the maximum concentration of R.
|
Calculation or a calendar of some activity.
: 1. Provide Java code for a simple class of your choice. Be sure to include at least one constructor, two methods and two fields. The fields should be private.Create a test class to construct and call the methods of your class. Describe your class and..
|
Write a method called playlistbuilder
: 1. Write a method called playListBuilder that takes no parameters and returns an ArrayList of Strings.In the method body, declare an ArrayList of Strings called playList and populate it with songs (Strings) using input from the user at the command li..
|
Prepare a written report concerning your business
: Based on the readings for this week and your outside research, determine the type of business entity you will use (corporation, LLC, sole proprietorship, partnership, LLP, etc.). You should consider issues such as ease of formation, liability, tax..
|
What is a healthcare war room?
: What is a healthcare war room?
|
What is the flexible budget formula for factory overhead
: What is the flexible budget formula for factory overhead? As a HR manager, how might you make use of this information in the decisions being made about employee headcount - including hiring and staffing choices
|
What is humes attack against causation
: What is Humes attack against causation - why does the version of Consequentialism, Ethical Egoism, not meet the Moral Criteria of Adequacy?
|