Questions
Task 1: BetterHealth is a membership-based fitness club in Toronto. Customers can purchase a membership that...

Task 1: BetterHealth is a membership-based fitness club in Toronto. Customers can purchase a membership that provides a fixed number (e.g. 100) of free visits to the club upon registration. When the initial number of visits runs out, they can purchase additional visits as needed. All types of fitness equipment and all fitness classes offered in the club are open for this membership. Please write a Java program (Membership.java) for membership management.

The Membership class should have the following public interface:

1. public Membership(String name, int visits): A constructor to set up the member’s name and the initial number of visits allowed. The parameter visits is supposed to be positive (if not, initialize the number of visits to 0).

2. public String getName(): An accessor to return the member’s name.

3. public int getRemainingVisits(): An accessor to return the number of remaining visits.

4. public boolean isValid(): A method to decide if one’s membership is still valid (true if the number of remaining visits is greater than 0; false otherwise).

5. public boolean topUp (int additionalVisits): A method to add additional visits (represented by additionalVisits) to the remainingVisits. Returns true if the top-up succeeds and false otherwise. The top-up succeeds only If the given additionalVisits is non-negative.

6. public boolean charge(): A method that deducts 1 from the number of remaining visits when the membership is valid. Returns true if the charge succeeds and false otherwise. The charge succeeds only if the membership is valid before charging.

7. public boolean equipmentAllowed(): A method that indicates whether the equipment at the gym is available to this kind of membership. Returns true for now; to be updated in Task 2.

8. public boolean classesAllowed(): A method that indicates whether the fitness classes at the gym are available to this kind of membership. Returns true for now; to be updated in Task 2.

Write a tester program Task1MembershipTester to test the class you have written.

Follow the examples given in class (e.g., BankAccountTester), and create an objectfrom the class Membership above. Test the public interface of your class thoroughly (each public method must be tested at least once). For accessor methods, print out the expected return value and the return value of your method (see the BankAccountTester example) to compare. This tester class is not to be submitted for marking, but it is beneficial for you to make sure your Membership class works as intended.

Task 2: The club now introduces a new type of membership called PremiumMembership. It is valid within one year from the date of purchase for unlimited visits. Such members can use fitness equipment, but cannot attend fitness classes. In addition, pool access is available for this type of membership. Since now we have two types of memberships (and imagine down the road we might have more), you should implement a hierarchy of classes to represent the different types of membership. At the top of the hierarchy, you must define an abstract class called BaseMembership defining the methods common to different types of memberships. BaseMembership has the following public interface:

1. public BaseMembership(String name, String type): A constructor to set up the member’s name and member’s type.

2. public String getName(): An accessor to return the member’s name.

3. public String getType(): An accessor to return a string that represents the type of membership.

4. public abstract boolean isValid(): An abstract method that should be overridden in the subclasses.

5. public boolean equipmentAllowed(): Set an initial return value and override in the subclasses.

6. public boolean classesAllowed(): Set an initial return value and override in the subclasses.

You must then define classes StandardMembership and PremiumMembership that inherit from BaseMembership, defining additional methods as needed. StandardMembership should be implemented to model the type of membership in Task 1. The class PremiumMembership should have the following public interface:

1. public PremiumMembership(String name, String startDateString): A constructor to set up the member’s name and his start date. To transform startDateString to a Date type, a method stringToDate is provided in the hint below.

2. public boolean isValid(): A method to decide if one’s membership is still valid (If the current time is less than one year from the start time, it is valid). Please see the hint below.

3. public boolean equipmentAllowed(): Return true.

4. public boolean classesAllowed(): Return false.

5. public boolean poolAllowed(): Return true.

Hint: Java uses the number of milliseconds since January 1, 1970, 00:00:00 GMT to represent time/date. Use ‘new java.util.Date()’ to create a Date object of the current time in milliseconds. ‘System.currentTimeMillis()’ is used to get the current time in milliseconds; ‘getTime()’ is used to return the long milliseconds of a Date object; One year in milliseconds can be presented: long MILLIS_YEAR = 360 * 24 * 60 * 60 * 1000L;

/**

* Utility method to transform a string represented date to Date object.

* E.g., "2010-01-02" will be transformed to Sat Jan 02 00:00:00 GMT 2010

*/

import java.text.DateFormat;

import java.text.ParseException;

import java.text.SimpleDateFormat;

import java.util.Date;

public static Date stringToDate(String dateString) {

DateFormat f = new SimpleDateFormat("yyyy-MM-dd");

Date date = null;

try {

date= f.parse(dateString);

} catch (ParseException e) {

e.printStackTrace();

}

return date;

}Similarly, write a tester program Task2MembershipTester to test the classes you

have written in Task 2. Create objects from the classes StandardMembership and

PremiumMembership above. This tester class is not to be submitted.

In: Computer Science

Using Java Write only “stubs” for methods in the Figure, Rectangle, and Triangle classes: Consider a...

Using Java

Write only “stubs” for methods in the Figure, Rectangle, and Triangle classes:

Consider a graphics system that has classes for various figures — say, rectangles, boxes, triangles, circles, and so on. For example, a rectangle might have data members’ height, width, and either a center point or upper-left corner point, while a box and circle might have only a center point (or upper-right corner point) and an edge length or radius, respectively. In a well-designed system, these would be derived from a common class, Figure. In this homework assignment, you will implement such a system.

The class Figure is an abstract base class. In this class, create abstract methods for draw, erase, center, equals, and toString.

Add Rectangle and Triangle classes derived from Figure. Each class has stubs for methods erase, draw, and center. In these "stubs", the method simply prints a message telling the name of the class and which method has been called in that class. Because these are just stubs, they do nothing more than output this message. The method center calls the erase and draw methods to erase the object at its current location and redraw the figure at the center of the picture being displayed. Because you have only stubs for erase and draw, center will not do any real “centering” but simply will call the methods erase and draw, which will allow you to see which versions of draw and center it calls. Add an output message in the method center that announces that center is being called. The methods should take no arguments.

Define a demonstration program for your classes which contains main. Test your programs:

  • creating at least two Rectangle objects and two Triangle objects.
    • All instantiated classes have an equals and toString methods because these are abstract in the Figure class.
    • In this part of the homework, equals can simply return true, and toString can returns a String announcing that toString has been invoked.
  • "draw" all of the objects you just created
  • "center" at least one Rectangle and one Triangle object

In main, make sure that you tell the user what's going on at each step.

Your output should consist primarily of messages from your stub methods. An example of the output from your program might be the following (note: output from main method is shown below in italics):

  ** Create 2 triangles **
  Entering Figure Constructor for triangle 0
  Running Triangle constructor for triangle 0
  Entering Figure Constructor for triangle 1
  Running Triangle constructor for triangle 1

  ** Create 2 rectangles **
  Entering Figure Constructor for rectangle 0
  Running Rectangle constructor for rectangle 0
  Entering Figure Constructor for rectangle 1
  Running Rectangle constructor for rectangle 1

  ** Draw both triangles **
  Entering draw() method for Triangle 0
  Entering draw() method for Triangle 1

  ** Draw both rectangles **
  Entering draw() method for Rectangle 0
  Entering draw() method for Rectangle 1

  ** Center one triangle **
  Entering center() method for Triangle 0
  center() calling erase()
  Entering erase() method for Triangle 0>
  center() calling setCenter() to reset center.  
  Entering Figure's setCenter() for figure 0
  center() calling draw()
  Entering draw() method for Triangle 0

  ** Center one rectangle **
  Entering center() method for Rectangle 1
  center() calling erase()
  Entering erase() method for Rectangle 1
  center() calling setCenter()
  Entering Figure's setCenter() for figure 1
  center() calling draw()
  Entering draw() method for Rectangle 1

In: Computer Science

Apply the nursing Process to the following Hypothetical situation Mrs. Rojas, 30 years old, came to...

Apply the nursing Process to the following

Hypothetical situation


Mrs. Rojas, 30 years old, came to the emergency room with a cold two weeks ago, she presented dyspnea (difficulty breathing). It indicates that you have a fever, headache for several days, chest pain, and you have to sit up to breathe well. Also, complaints of chills have decreased fluid intake 2 days ago. On physical examination temp. 39.5C, pulse 92 reg., Strong, Resp. 22 / min. Superficial. B / P 122/80., Dry mouth mucosa, pale, hot skin, reddened cheeks. Decreased vesicular and crackling sounds on inspiration in the right upper and lower lobe. Its thoracic expansion is 3 cm., Scant cough, dense sputum of light pink color. Lethargic, weak, and fatigued appearance. The doctor suspects that this may have the diagnosis Influenza A H1N1.
After reading the situation, answer the following questions;
1.After reading and analyzing the situation, identify the estimated data, and classify them as subjective and objective.


2. Mention the problems that you infer in this situation?

3. According to the NANDA category, which nursing diagnosis applies in this situation. (It must include Problem, etiology and symptoms).

4. Develop the expected result for this Situation

5.Develop nursing interventions such as coordinating and managing
Care of this patient, include the nursing orders and justification for each intervention. (Complete the table).


                   Nursing orders                                    Justification                              

6. Mention what legal ethical implications should be considered in this condition.


7. List and define the six nursing steps and define them.

outcome

Care providers to individuals in different settings, understanding cultural variations, effective communication based on their learning style.
 Coordinator and care manager in situations that require problem-solving and uses principles of delegation when warranted.
Practice the profession according to the legal framework of the profession's standards.
Uses the nursing process as a framework to develop, implement, and evaluate the care plan for the healthy individual or with a minimum of alterations.
 Information management.

In: Nursing

Write a C# console program that continually asks the user "Do you want to enter a...

Write a C# console program that continually asks the user "Do you want

to enter a name (Y/N)? ". Use a "while" loop to accomplish this. As long as the user enters

either an upper or lowercase 'Y', then prompt to the screen "Enter First and Last Name: " and

then get keyboard input of the name. After entering the name, display the name to the screen.

---

Create a Patient class which has private fields for patientid, lastname,

firstname, age, and email. Create public data items for each of these private fields with get and

set methods. The entire lastname must be stored in uppercase. Create a main class which

instantiates a patient object and sets values for each data item within the class. Display the

data in the object to the console window.

---

Modify the Patient class with two overloaded constructors: A new default

constructor which initializes the data items for a patient object using code within the

constructor (use any data). A second constructor with parameters to pass all the data items

into the object at the time of instantiation. Create a test main class which instantiates two

objects. Instantiate the first object using the default constructor and the second object using

the constructor with the parameters.

---

Modify the main class in the patient application to include a display

method that has a parameter to pass a patient object and display its content.

---

Modify the patient class with two overloaded methods to display a bill for a

standard visit based on age. In the first method do not use any parameters to pass in data. If

the patient is over 65, then a standard visit is $75. If the patient is under 65, then the standard

doctors office visit is $125. Build a second method where you pass in a discount rate. If the

patient is over 65, then apply the discount rate to a standard rate of $125. Create a main

method that calls both of these methods and displays the results.

-----

Create two subclasses called outpatient and inpatient which inherit from

the patient base class. The outpatient class has an additional data field called doctorOfficeID

and the inpatient class has an additional data item called hospitalID. Write a main method that

creates inpatient and outpatient objects. Sets data for these objects and display the data.

---

Modify the base class of Problem 5 to be an abstract class with an abstract

display method called displayPatient that does not implement any code. Create specific

implementations for this method in both the outpatient and inpatient subclasses

In: Computer Science

Insurance companies know the risk of insurance is greatly reduced if the company insures not just...

Insurance companies know the risk of insurance is greatly reduced if the company insures not just one person, but many people. How does this work? Let x be a random variable representing the expectation of life in years for a 25-year-old male (i.e., number of years until death). Then the mean and standard deviation of x are μ = 48.7 years and σ = 10.3 years (Vital Statistics Section of the Statistical Abstract of the United States, 116th Edition).

Suppose Big Rock Insurance Company has sold life insurance policies to Joel and David. Both are 25 years old, unrelated, live in different states, and have about the same health record. Let x1 and x2be random variables representing Joel's and David's life expectancies. It is reasonable to assume x1 and x2 are independent.

Joel, x1: 48.7; σ1 = 10.3
David, x2: 48.7; σ1 = 10.3

If life expectancy can be predicted with more accuracy, Big Rock will have less risk in its insurance business. Risk in this case is measured by σ (larger σ means more risk).

(a) The average life expectancy for Joel and David is W = 0.5x1 + 0.5x2. Compute the mean, variance, and standard deviation of W. (Use 2 decimal places.)

μ
σ2
σ

(b) Compare the mean life expectancy for a single policy (x1) with that for two policies (W).

The mean of W is larger.The means are the same.     The mean of W is smaller.


(c) Compare the standard deviation of the life expectancy for a single policy (x1) with that for two policies (W).

The standard deviation of W is smaller.The standard deviation of W is larger.     The standard deviations are the same.

In: Statistics and Probability

Insurance companies know the risk of insurance is greatly reduced if the company insures not just...

Insurance companies know the risk of insurance is greatly reduced if the company insures not just one person, but many people. How does this work? Let x be a random variable representing the expectation of life in years for a 25-year-old male (i.e., number of years until death). Then the mean and standard deviation of x are μ = 52.4 years and σ = 12.1 years (Vital Statistics Section of the Statistical Abstract of the United States, 116th Edition).

Suppose Big Rock Insurance Company has sold life insurance policies to Joel and David. Both are 25 years old, unrelated, live in different states, and have about the same health record. Let x1 and x2 be random variables representing Joel's and David's life expectancies. It is reasonable to assume x1 and x2 are independent.

Joel, x1: 52.4; σ1 = 12.1 David, x2: 52.4; σ2 = 12.1

If life expectancy can be predicted with more accuracy, Big Rock will have less risk in its insurance business. Risk in this case is measured by σ (larger σ means more risk). (a) The average life expectancy for Joel and David is W = 0.5x1 + 0.5x2. Compute the mean, variance, and standard deviation of W. (Use 2 decimal places.)

μ

σ2

σ

(b) Compare the mean life expectancy for a single policy (x1) with that for two policies (W).

The mean of W is larger.

The means are the same.

The mean of W is smaller.

(c) Compare the standard deviation of the life expectancy for a single policy (x1) with that for two policies (W).

The standard deviation of W is smaller.

The standard deviations are the same.

The standard deviation of W is larger.

In: Statistics and Probability

Insurance companies know the risk of insurance is greatly reduced if the company insures not just...

Insurance companies know the risk of insurance is greatly reduced if the company insures not just one person, but many people. How does this work? Let x be a random variable representing the expectation of life in years for a 25-year-old male (i.e., number of years until death). Then the mean and standard deviation of x are μ = 52.5 years and σ = 10.1 years (Vital Statistics Section of the Statistical Abstract of the United States, 116th Edition). Suppose Big Rock Insurance Company has sold life insurance policies to Joel and David. Both are 25 years old, unrelated, live in different states, and have about the same health record. Let x1 and x2 be random variables representing Joel's and David's life expectancies. It is reasonable to assume x1 and x2 are independent.

Joel, x1: 52.5; σ1 = 10.1 David, x2: 52.5; σ1 = 10.1

If life expectancy can be predicted with more accuracy, Big Rock will have less risk in its insurance business. Risk in this case is measured by σ (larger σ means more risk).

(a) The average life expectancy for Joel and David is W = 0.5x1 + 0.5x2. Compute the mean, variance, and standard deviation of W. (Use 2 decimal places.) μ σ2 σ

(b) Compare the mean life expectancy for a single policy (x1) with that for two policies (W). The mean of W is smaller. The mean of W is larger. The means are the same.

(c) Compare the standard deviation of the life expectancy for a single policy (x1) with that for two policies (W). The standard deviation of W is larger. The standard deviation of W is smaller. The standard deviations are the same.

In: Statistics and Probability

Public financial management is critical for successful delivery of public services. The prime objective of public...

Public financial management is critical for successful delivery of public services. The prime
objective of public financial management is to ensure that public resources allocated to projects
and programmes through covered entities are applied economically, efficiently and effectively
to enhance value for money in public spending. Contrary to expectation, public financial
management in Ghana is bedevilled with gross infractions, irregularities and malpractices
which deny the citizens the quality of public service delivery they deserve. The current Auditor
General’s Report on Public Accounts of the central government agencies, the local
governments and educational institutions reveal that several millions of Ghana Cedis is lost to
financial impropriety and malpractices. This has been on the increase over the years. surely,
these occurrences should attract policy attention.
Ghana Moni is a Civil Society Organisation with the prime aim of demanding and promoting
accountability in Ghana. Ghana Moni is organising an essay writing competition for Final Year
Accountancy Students in all Universities in Ghana on the topic: Accounting for Financial
Impropriety in Public Financial Management in Ghana. The aim of the competition is to
gather fresh and further evidence on the causes and practical remedies of the persistent misuse
of public resources. The award for winners is GHS100,000.00. The deadline for submission is
48 hours from now.
Required:
Make your entry into the competition in strict compliance with these requirements:
i) Abstract (Not exceeding 100 words)
ii) Introduction (Not exceeding 200 words)
iii) Taxonomy of financial impropriety3
(Not exceeding 300 words)
iv) Causes of financial impropriety in the public sector (Not exceeding 600 words)
v) Practical remedies of financial impropriety (Not exceeding 600 words)
vi) Conclusion (Not exceeding 100 words)

In: Economics

Effects, Politics, and Regulatory Control of Tobacco Use Tobacco use is the primary cause of mortality...

Effects, Politics, and Regulatory Control of Tobacco Use Tobacco use is the primary cause of mortality in the United States today. Tobacco use is responsible for cancer, chronic obstructive pulmonary disease (COPD), asthma, and heart disease and has caused the deaths of nearly half a million people per year. Tobacco control, prevention, and treatment are compelling and urgent public health issues.

The development of tobacco control laws have been passed by a number of states. Write a comprehensive overview of the health effects, politics, and regulatory control of tobacco use control efforts. Your paper should be based on the following points:

What are the factors (biological, environmental, economic, and political) that contribute to tobacco addiction?

What are the medical consequences (morbidity and mortality) for tobacco users?

What is the public health impact (epidemiological and economic) of tobacco use and secondhand smoke exposure?

How do tobacco control regulations relate to positive and normative economics?

How do tobacco control regulations impact individual health care What is the public health policy regarding tobacco control?

What is the role of the state and Federal Government in policy making? What is the history of regulatory tobacco control?

What is the current state of tobacco control in the United States (states that have passed tobacco control regulations)?

What is the evidence that tobacco control is effective?

Based on your understanding, create a 6- to 7-page Microsoft Word document that includes the answers to the above questions. You need a minimum of five scholarly sources that should be in APA format for both in-text citations and citations on the reference page. This assignment requires a title page, an abstract, an introduction, a body, a conclusion, and a reference page.

In: Nursing

QUESTION THREE Public financial management is critical for successful delivery of public services. The prime objective...

QUESTION THREE
Public financial management is critical for successful delivery of public services. The prime objective of public financial management is to ensure that public resources allocated to projects and programmes through covered entities are applied economically, efficiently and effectively to enhance value for money in public spending. Contrary to expectation, public financial management in Ghana is bedevilled with gross infractions, irregularities and malpractices which deny the citizens the quality of public service delivery they deserve. The current Auditor General’s Report on Public Accounts of the central government agencies, the local governments and educational institutions reveal that several millions of Ghana Cedis is lost to financial impropriety and malpractices. This has been on the increase over the years. surely, these occurrences should attract policy attention.

Ghana Moni is a Civil Society Organisation with the prime aim of demanding and promoting accountability in Ghana. Ghana Moni is organising an essay writing competition for Final Year Accountancy Students in all Universities in Ghana on the topic: Accounting for Financial Impropriety in Public Financial Management in Ghana. The aim of the competition is to gather fresh and further evidence on the causes and practical remedies of the persistent misuse of public resources. The award for winners is GHS100,000.00. The deadline for submission is 48 hours from now.

Required:
Make your entry into the competition in strict compliance with these requirements:
i) Abstract (Not exceeding 100 words)

ii) Introduction (Not exceeding 200 words)
Taxonomy of financial impropriety (Not exceeding 300 words)
Causes of financial impropriety in the public sector (Not exceeding 600 words)

v) Practical remedies of financial impropriety (Not exceeding 600 words)

vi) Conclusion (Not exceeding 100 words)

In: Accounting