Questions
BankAccount: You will create 3 files: The .h (specification file), .cpp (implementation file) and main file....

BankAccount:
You will create 3 files: The .h (specification file), .cpp (implementation file) and main file. You will practice writing class constants, using data files. You will add methods public and private to your BankAccount class, as well as helper methods in your main class. You will create an array of objects and practice passing objects to and return objects from functions. String functions practice has also been included.

  1. Extend the BankAccount class. The member fields of the class are: Account Name, Account Id, Account Number and Account Balance. The field Account Id (is like a private social security number of type int) Convert the variables MIN_BALANCE=9.99, REWARDS_AMOUNT=1000.00, REWARDS_RATE=0.04 to static class constants Here is the UML for the class:

                                                        BankAccount

-string accountName // First and Last name of Account holder

-int accountId // secret social security number

-int accountNumber // integer

-double accountBalance // current balance amount

+ BankAccount()                     //default constructor that sets name to “”, account number to 0 and balance to 0

+BankAccount(string accountName,int id, int accountNumber, double accountBalance)   // regular constructor

+getAccountBalance(): double // returns the balance

+getAccountName: string // returns name

+getAccountNumber: int

+setAccountBalance(double amount) : void

+equals(BankAccount other) : BankAccount // returns BankAccount object **

-getId():int **

+withdraw(double amount) : bool //deducts from balance and returns true if resulting balance is less than minimum balance

+deposit(double amount): void //adds amount to balance. If amount is greater than rewards amount, calls

// addReward method

-addReward(double amount) void // adds rewards rate * amount to balance

+toString(): String   // return the account information as a string with three lines. “Account Name: “ name

                                                                                                                                                   “Account Number:” number

                                                                                                                                                    “Account Balance:” balance

  1. Create a file called BankAccount.cpp which implements the BankAccount class as given in the UML diagram above. The class will have member variables( attributes/data) and instance methods(behaviours/functions that initialize, access and process data)
  2. Create a driver class to do the following:
    1. Read data from the given file BankData.data and create and array of BankAccount Objects

The order in the file is first name, last name, id, account number, balance. Note that account name consists of both first and last name

  1. Print the array (without secret id) similar to Homeowork2 EXCEPT the account balance must show only 2 decimal digits. You will need to do some string processing.
  2. Find the account with largest balance and print it
  3. Find the account with the smallest balance and print it.
  4. Determine if there are duplicate accounts in the array. If there are then set the duplicate account name to XXXX XXXX and rest of the fields to 0. Note it’s hard to “delete” elements from an array. Or add new accounts if there is no room in the array. If duplicate(s) are found, print the array.


    BankData.dat
    Matilda Patel 453456 1232 -4.00
    Fernando Diaz 323468 1234 250.0
    Vai vu 432657 1240 987.56
    Howard Chen 234129 1236 194.56
    Vai vu 432657 1240 -888987.56
    Sugata Misra 987654 1238 10004.8
    Fernando Diaz 323468 1234 8474.0
    Lily Zhaou 786534 1242 001.98

In: Computer Science

You have been assigned to a development team that is building software that will be used...

You have been assigned to a development team that is building software that will be used to control the operations of a bicycle rental store. A rental store has a limited number of vehicles that can be managed. A bicycle rental store must maintain information about how many vehicles are available for rental. The bicycle rental store must provide publicly available methods to allow vehicles to be added and removed from it. The rental store should also provide publicly available methods that reports its capacity. An attempt to add or remove the vehicle other than it’s capacity should print the message letting user know that he/she can’t add or delete the vehicle (Hint: use “if” condition to check the number of vehicles. They shouldn’t be more that 5/5 each to add and less than 1 to delete). At the moment there are two distinct types of vehicles: bicycle and quadricycle (four-wheel bicycle). Every vehicle has a company code, a fun name, number of wheels and a rental price. The bicycle has two wheels whereas quadricycle has four. Define the Java classes that are required to implement the functionality that is described above. Be sure to use object-oriented principles in your Java code. Hints • Vehicle class, Bicycle class, Quadricycle class, RentalStore class. • Bicycle class and Quadricycle class inherits extends from Vehicle class • RentalStore class will have methods to show the total number of vehicles, add/delete Bicycle and add/delete Quadricycle • Rental class should have ArrayList • In general every class should have attributes, constructor and it’s methods. • Besides RentalStore class, all other classes should have toString() method . • Create TestClass that have Main() method. Bicycles: company code 0001, a fun name ( your choice), number of wheels : 2 and a rental price 150 company code 0002, a fun name ( your choice), number of wheels : 2 and a rental price 110 company code 0003, a fun name ( your choice), number of wheels : 2 and a rental price 50 company code 0004, a fun name ( your choice), number of wheels : 2 and a rental price 250 company code 0005, a fun name ( your choice), number of wheels : 2 and a rental price 90 quadricycle : company code 0011, a fun name ( your choice), number of wheels : 4 and a rental price 250 company code 0012, a fun name ( your choice), number of wheels : 4 and a rental price 110 company code 0013, a fun name ( your choice), number of wheels : 4 and a rental price 210 company code 0014, a fun name ( your choice), number of wheels : 4 and a rental price 210 company code 0015, a fun name ( your choice), number of wheels : 4 and a rental price 190 For this scenario, we will have 5 bicycles and 5 quadricycles (total of 10 vehicles). Add all those vehicles to an ArrayList. Find bicycles with price less than $100 and delete all of them. Find quadricycles with price less than $200 and delete all of them. At last, show to total number of remaining vehicles with their details.

In: Computer Science

Verify Login Page that either gives error when not meeting the requirement or directing it to...

Verify Login Page that either gives error when not meeting the requirement or directing it to "blogs.php" when it's a successful log in..

Hi, so this is actually my html code for the log in and sign up page and I just needed help creating a verify log in/ sign up page with exception handling. Username has to be at least 6 character long. Password has to be 6 characters long and end with a number.

Blogs.com

"

"index.html"

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blogs.com</title>
</head>

<body>
<h2>Sign in </h2>

<p> Enter your username and password to sign in!</p>
<form method="POST" action ="blogs.php">
<p> User Name <input type ="text" name="username"/></p>
<p> Password <input type="text" name ="passwordname" /></p>

<input type="submit" value= "Sign in"/></p>
</form>


<p> Sign up if you're a first time user!</p>


<form method="POST" action ="UserRegistration.php">
<input type="submit" value= "Sign up!"/></p>


<br /><br />
<script>
var date =new Date();
document.write("Today " ,date);
</br>
</script>
</body>
</html>

"UserRegistration"

<?php
   session_start();
   $_SESSION = array();
   session_destroy();
  
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml">
       <head>
           <title>User Registration</title>
           <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
       </head>
       <body>
           <h1>User Registration</h1>
           <h2>Register / Log In</h2>
           <p>New user's, please complete the top form to register as a new user. Returning user's, please complete
               the second form to log in.</p>
           <hr />
           <h3>User Registration</h3>
           <form method="post" action="Register.php?<?php echo SID; ?>">
               <p>Enter your Name:
                   First <input type="text" name="first" />
                   Last <input type="text" name="last" />
               </p>
               <p>Enter your e-mail address:
                   <input type="text" name="email" />
               </p>
               <p>Enter your password:
                   <input type="password" name="password" />
               </p>
               <p>Confirm your password:
                   <input type="password" name="password2" />
               </p>
               <p>
                   <em>(Passwords are case-sensitive and must be at least 6 characters long)</em>
               </p>
               <input type="reset" name="reset" value="Reset Registration Form" />
               <input type="submit" name="register" value="Register" />
           </form>
           <hr />
           <?php
               $nag_counter = 0;
               if(isset($_COOKIE['userVisit']))
                   $UserVisit = "<p>Your visit number is $nag_counter was on " . $_COOKIE['userVisit'];
                  
               else
                   $UserVisit = "<p>This is your first visit!</p>\n";
              
               ++$nag_counter;
               setcookie("userVisit", date("F j, Y, g:i a"), time()+60*60*24*365);
           ?>
           <?php
               echo $UserVisit;
           ?>
       </body>
   </html>

"

In: Computer Science

The ongoing changes in the health-care landscape are influenced most by globalization, economic and technological factors,...

The ongoing changes in the health-care landscape are influenced most by globalization, economic and technological factors, and the aging of the population. The complexity of the healthcare environment requires us to examine the leadership needs for the APN roles that are applicable for today and the future (Joel, 2018). In chapter 21 (Leadership for APNs: If Not Now, Then When?) the author outlines serval leadership theories or styles including:

  • Situational or Contingency Leadership;
  • Servant Leadership;
  • Transformational or Transactional Leardershp;
  • Rational Leadership;
  • Clinical Leadership and Congruent Leadership.

Select one of the above leadership theories or style.

  1. Using your own words define the theory.
  2. Considering the various APN roles (Clinician, Educator, Researcher, Administrator, Entrepreneur, Consultant, and Leader) describe how you might use the leadership theory in your future APN role.
  3. From your experience as a professional nurse, give one example of the selected leadership theory or style as seen in action or provide an exemplary example.

In: Nursing

Relationship of Hospitalized Elders’ Perceptions of Nurse Caring Behaviors, Type of Care Unit, Satisfaction With Nursing...

Relationship of Hospitalized Elders’ Perceptions of Nurse Caring Behaviors, Type of Care Unit, Satisfaction With Nursing Care, and Health Outcome of Functional Status Marlene Melchiorre Dey, PhD, APN, ACNP-BC, ANP-BC, Elite Medical Care .

According to Grove & Gray (2019), what are the potential biases of this sampling method?

a. This is a strong probability sampling method with very little potential for bias.

b. This method is used when an ordered list of all members of the population are available, and provides a random but not equal chance for inclusion in the study.

c. This method provides little opportunity to control for bias because subjects are included in the study merely because they happen to be in the right place at the right time.

d. This method is specific to the individuals who were recruited and the information gained cannot be generalized to others who don't share these types of experiences. e. None of the above biases best describe the sampling method chosen by the author.

In: Nursing

A common design requirement is that an environment must fit the range of people who fall...

A common design requirement is that an environment must fit the range of people who fall between the 5th percentile for women and the 95th percentile for men. In designing an assembly work​ table, the sitting knee height must be​ considered, which is the distance from the bottom of the feet to the top of the knee. Males have sitting knee heights that are normally distributed with a mean of 21.8 in. and a standard deviation of 1.3 in. Females have sitting knee heights that are normally distributed with a mean of 19.7 in. and a standard deviation of 1.2 in. Use this information to answer the following questions.

- What is the minimum table clearance required to satisfy the requirement of fitting 95% of men?

- Determine if the following statement is true or false. If there is clearance for 95% of males, there will certainly be clearance for all women in the bottom 5%.

- The author is writing this exercise at a table with a clearance of 23.1 in. above the floor. What percentage of men fit this table?

- What percentage of women fit this table?

In: Statistics and Probability

I am doing a lab and I get this error message in my unittest: junit.framework.AssertionFailedError: Hint:...

I am doing a lab and I get this error message in my unittest: junit.framework.AssertionFailedError: Hint: matches() should have returned true when item matches the item passed into IdLookup constructor. Here is my code. What changes should be made?

/**
* This class is a lookup that matches items whose id matches exactly
* a specified id, to be passed into the constructor when creating
* the instance of the lookup.
*
* @author Franklin University
* @version 2.0
*/
public class IdLookup implements Lookup
{
private String lookupId;

/**
* Constructor for objects of class IdLookup.
* @param id the id to lookup.
*/
public IdLookup(String id)

{
  
   lookupId = id;
  
}

/**
* Indicates whether the item's id exactly matches the id
* passed into the contructor.
* @param item the item being checked for a match.
* @return true if the id of the item matches, otherwise
* false.
*/
@Override
public boolean matches(Item item)
{
   if (item == null) {
       return false;
      
   }
  
  
  
   return lookupId == item.getId();
      
     
  
}
}

In: Computer Science

Read the article below and as you’re reading it translate how the ‘utility’ concepts in this...

Read the article below and as you’re reading it translate how the ‘utility’ concepts in this week’s lesson are applied in the article. Note, for example, that the author talks about ‘value’ relative to price. This indicates to you that ‘utility’ is sometimes referred to as ‘value’ by some marketers.

Hall, Doug. (Dec 13, 2007). Jump Start: Perceiving is Believing. Bloomberg Business Week.

Preview the document

Now, look for a news headline that illustrates basic utility concepts (such as MU, TU, MU/P, etc.). Quote (post) the headline and cite properly (so that others like classmates and instructors can find your headline easily, using your citation), and explain precisely what utility concepts are illustrated and how they are applied in the story suggested by the headline. OR: Upload a photo of something you observed or noticed in a marketplace that illustrates utility and consumer choice. and explain precisely what utility concepts are illustrated and how they are applied in the shot that you’ve uploaded.

In: Economics

Stanford University medical researchers conducted a study on the correlation between the use of fertility drugs...

Stanford University medical researchers conducted a study on the correlation between the use of fertility drugs and ovarian cancer. Their study, published in the American Journal of Epidemiology, concludes that the use of the fertility drugs, Pergonal and Serophene, may increase the risk of ovarian cancer by three times. The lead author of the studies, Professor Alice Whittemore, stated, "Our finding in regard to fertility drugs is by no means certain. It is based on very small numbers and is really very tenuous."

​FDA Commissioner David Kessler would like the infertility drug manufacturers to disclose the study findings and offer a warning on the drug packages. He notes, "Even though the epidemiology study is still preliminary, women have a right to know what is known. We're not looking to make more of this than there is."

​If you were a manufacturer of one of the drugs, would you voluntarily disclose the study information?

Please Answer the above Questions No Plagiarism NEED 400 WORDS

In: Operations Management

Deviance/Global Stratification Choose a piece of popular fiction—novel, short story, graphic novel, or comic book—and research...

Deviance/Global Stratification

Choose a piece of popular fiction—novel, short story, graphic novel, or comic book—and research the material through the lens of popular culture and its effect on society.

Prepare a 500- to 750-word analysis that includes a critique of that work and a commentary on the influence of the work in popular culture. Address the following:

• Identify the literary production you chose to focus on. Provide a brief overview of what the piece is about, the author’s background, and how the piece fits or does not fit with other literature of that genre.

• What is the cultural significance of the work Reflect on whether the piece is considered economically successful or if it has fan followings.

• What cultural values are reinforced or challenged in the work?

Consider the following examples:

• How the Harry Potter novels are encouraging young adults to read

• Does the Twilight series reinforce or challenge traditional gender roles?

• The quest for truth in the novels of Dan Brown, author of The Da Vinci Code and Angels & Demons

In: Psychology