Questions
Programming Language: C# Person Class Fields - password : string Properties + «C# property, setter private»...

Programming Language: C#

Person

Class

Fields

- password : string

Properties

+ «C# property, setter private» IsAuthenticated : bool

+ «C# property, setter absent» SIN : string

+ «C# property, setter absent» Name : string

Methods

+ «Constructor» Person(name : string, sin : string)

+ Login(password : string) : void

+ Logout() : void

+ ToString() : string

Transaction

Class

Properties

+ «C# property, setter absent » AccountNumber : string

+ «C# property, setter absent» Amount : double

+ «C# property, setter absent» Originator : Person

+ «C# property, setter absent» Time : DateTime

Methods

+ «Constructor» Transaction(accountNumber : string, amount : double, endBalance : double, person : Person, time : DateTime)

+ ToString() : string

ITransaction

Interface

Methods

   Withdraw(amount : double, person : Person) : void

   Deposit(amount : double, person : Person) : void

Account

Abstract Class

Fields

# «readonly» users : List<Person>

# «readonly» transactions : List<Transaction>

$- LAST_NUMBER = 100_000: int

Properties

+ «C# property, setter absent» Number: string

+ «C# property, protected setter» Balance: double

+ «C# property, protected setter» LowestBalance : double

Methods

+ «Constructor» Account(type : string, balance : double)

+ Deposit(balance : double, person : Person) : void

+ AddUser(person : Person) : string

+ IsUser(name : string) : bool

+ «C# abstract method» PrepareMonthlyStatement() : void

+ ToString() : string

CheckingAccount

Class

→ Account, ITransaction

Fields

$- COST_PER_TRANSACTION = 0.05 : double

$- INTEREST_RATE = 0.005 : double

- hasOverdraft: bool

Methods

+ «Constructor» CheckingAccount(balance = 0 : double, hasOverdraft = false: bool)

+ Deposit(amount : double, person : Person) : void

+ Withdraw(amount : double, person : Person) : void

+ PrepareMonthlyReport(amount : double, person : Person) : void

SavingAccount

Class

→ Account, ITransaction

Fields

$- COST_PER_TRANSACTION : double

$- INTEREST_RATE : double

Methods

+ «Constructor» SavingAccount(balance = 0 : double)

+ Deposit(amount : double, person : Person) : void

+ Withdraw(amount : double, person : Person) : void

+ PrepareMonthlyReport(amount : double, person : Person) : void

In: Computer Science

C++ Language Oriented program. Please help me out with this project !!! Banks offer various types...

C++ Language Oriented program. Please help me out with this project !!!

Banks offer various types of accounts, such as savings, checking, certificate of deposits, and money market, to attract customers as well as meet their specific needs. Two of the most commonly used accounts are savings and checking. Each of these accounts has various options. For example, you may have a savings account that requires no minimum balance but has a lower interest rate. Similarly, you may have a checking account that limits the number of checks you may write. Another type of account that is used to save money for the long term is certificate of deposit (CD).

In this programming exercise, you use abstract classes and pure virtual functions to design classes to manipulate various types of accounts. For simplicity, assume that the bank offers three types of accounts: savings, checking, and certificate of deposit, as described next.

Savings accounts: Suppose that the bank offers two types of savings accounts: one that has no minimum balance and a lower interest rate and another that requires a minimum balance and has a higher interest rate.

Checking accounts: Suppose that the bank offers three types of checking accounts: one with a monthly service charge, limited check writing, no minimum balance, and no interest; another with no monthly service charge, a minimum balance requirement, unlimited check writing and lower interest; and a third with no monthly service charge, a higher minimum requirement, a higher interest rate, and unlimited check writing.

Certificate of deposit (CD): In an account of this type, money is left for some time, and these accounts draw higher interest rates than savings or checking accounts. Suppose that you purchase a CD for six months. Then we say that the CD will mature in six months. The penalty for early withdrawal is stiff.

Note that the classes bankAccount and checkingAccount are abstract. That is, we cannot instantiate objects of these classes. The other classes in Figure 12-25 are not abstract.

bankAccount: Every bank account has an account number, the name of the owner, and a balance. Therefore, instance variables such as name, accountNumber, and balance should be declared in the abstract class bankAccount. Some operations common to all types of accounts are retrieve account owner’s name, account number, and account balance; make deposits; withdraw money; and create monthly statements. So include functions to implement these operations. Some of these functions will be pure virtual.

checkingAccount: A checking account is a bank account. Therefore, it inherits all the properties of a bank account. Because one of the objectives of a checking account is to be able to write checks, include the pure virtual function writeCheck to write a check.

serviceChargeChecking: A service charge checking account is a checking account. Therefore, it inherits all the properties of a checking account. For simplicity, assume that this type of account does not pay any interest, allows the account holder to write a limited number of checks each month, and does not require any minimum balance. Include appropriate named constants, instance variables, and functions in this class.

noServiceChargeChecking: A checking account with no monthly service charge is a checking account. Therefore, it inherits all the properties of a checking account. Furthermore, this type of account pays interest, allows the account holder to write checks, and requires a minimum balance.

highInterestChecking: A checking account with high interest is a checking account with no monthly service charge. Therefore, it inherits all the properties

Copyright 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

of a no service charge checking account. Furthermore, this type of account pays higher interest and requires a higher minimum balance than the no service charge checking account.

savingsAccount: A savings account is a bank account. Therefore, it inherits all the properties of a bank account. Furthermore, a savings account also pays interest.

highInterestSavings: A high-interest savings account is a savings account. Therefore, it inherits all the properties of a savings account. It also requires a minimum balance.

certificateOfDeposit: A certificate of deposit account is a bank account. Therefore, it inherits all the properties of a bank account. In addition, it has instance variables to store the number of CD maturity months, interest rate, and the current CD month.

In: Computer Science

Programming language: Java If any more information is needed please let me know exactly what you...

Programming language: Java

If any more information is needed please let me know exactly what you need.

Though there are a bunch of files they are small and already done. Modify the driver file ,Starbuzz coffee, to be able to order each blend and be able to add each condiment to each of the blends. The price should be set accordingly. Be able to: order 1 of each type of beverage, add multiple toppings to each ordered beverage and use each condiment at least once.

Beverage.java:

public abstract class Beverage {
   String description = "Unknown Beverage";
  
   public String getDescription() {
       return description;
   }

   public abstract double cost();
}

CondimentDecorator.java:

public abstract class CondimentDecorator extends Beverage {
   public abstract String getDescription();
}

DarkRoast.java:

public class DarkRoast extends Beverage {
   public DarkRoast() {
       description = "Dark Roast Coffee";
   }

   public double cost() {
       return .99;
   }
}

Decaf.java:

public class Decaf extends Beverage {
   public Decaf() {
       description = "Decaf Coffee";
   }

   public double cost() {
       return 1.05;
   }
}

Espresso.java:

public class Espresso extends Beverage {
  
   public Espresso() {
       description = "Espresso";
   }
  
   public double cost() {
       return 1.99;
   }
}

HouseBlend.java:

public class HouseBlend extends Beverage {
   public HouseBlend() {
       description = "House Blend Coffee";
   }

   public double cost() {
       return .89;
   }
}

Caramel.java:

public class Caramel extends Beverage {
   public Caramel() {
       description = "Caramel Coffee";
   }

   public double cost() {
       return 1.35;
   }
}

Chocolate.java:

public class Chocolate extends CondimentDecorator {
   Beverage beverage;

   public Chocolate(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Chocolate";
   }

   public double cost() {
       return .20 + beverage.cost();
   }
}

Cinnamon.java:

public class Cinnamon extends CondimentDecorator {
   Beverage beverage;

   public Cinnamon(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Cinnamon";
   }

   public double cost() {
       return .15 + beverage.cost();
   }
}

Milk.java:

public class Milk extends CondimentDecorator {
   Beverage beverage;

   public Milk(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Milk";
   }

   public double cost() {
       return .10 + beverage.cost();
   }
}

Mint.java:

public class Mint extends CondimentDecorator {
   Beverage beverage;

   public Mint(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Mint";
   }

   public double cost() {
       return .15 + beverage.cost();
   }
}

Mocha.java:

public class Mocha extends CondimentDecorator {
   Beverage beverage;

   public Mocha(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Mocha";
   }

   public double cost() {
       return .20 + beverage.cost();
   }
}

Soy.java:

public class Soy extends CondimentDecorator {
   Beverage beverage;

   public Soy(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Soy";
   }

   public double cost() {
       return .15 + beverage.cost();
   }
}

Whip.java:

public class Whip extends CondimentDecorator {
   Beverage beverage;

   public Whip(Beverage beverage) {
       this.beverage = beverage;
   }

   public String getDescription() {
       return beverage.getDescription() + ", Whip";
   }

   public double cost() {
       return .10 + beverage.cost();
   }
}

StarbuzzCoffee.java:

public class StarbuzzCoffee {

   public static void main(String args[]) {
       Beverage beverage = new Espresso();
       System.out.println(beverage.getDescription()
               + " $" + beverage.cost());
              
       Beverage beverage1 = new Decaf();
       beverage1 = new Soy(beverage1);
       beverage1 = new Mocha(beverage1);
       beverage1 = new Whip(beverage1);
       beverage1 = new Cinnamon(beverage1);
       beverage1 = new Mint(beverage1);
       beverage1 = new Chocolate(beverage1);
       System.out.println(beverage1.getDescription()
               + " $" + beverage1.cost());

       Beverage beverage2 = new DarkRoast();
       beverage2 = new Soy(beverage2);
       beverage2 = new Mocha(beverage2);
       beverage2 = new Whip(beverage2);
       beverage2 = new Cinnamon(beverage2);
       beverage2 = new Mint(beverage2);
       beverage2 = new Chocolate(beverage2);
       System.out.println(beverage2.getDescription()
               + " $" + beverage2.cost());

       Beverage beverage3 = new HouseBlend();
       beverage3 = new Soy(beverage3);
       beverage3 = new Mocha(beverage3);
       beverage3 = new Whip(beverage3);
       beverage3 = new Cinnamon(beverage3);
       beverage3 = new Mint(beverage3);
       beverage3 = new Chocolate(beverage3);
       System.out.println(beverage3.getDescription()
               + " $" + beverage3.cost());
      
       Beverage beverage4 = new Hazelnut();
       beverage4 = new Soy(beverage4);
       beverage4 = new Mocha(beverage4);
       beverage4 = new Whip(beverage4);
       beverage4 = new Cinnamon(beverage4);
       beverage4 = new Mint(beverage4);
       beverage4 = new Chocolate(beverage4);
       System.out.println(beverage4.getDescription()
               + " $" + beverage4.cost());  

       Beverage beverage5 = new Caramel();
       beverage5 = new Soy(beverage5);
       beverage5 = new Mocha(beverage5);
       beverage5 = new Whip(beverage5);
       beverage2 = new Cinnamon(beverage5);
       beverage2 = new Mint(beverage5);
       beverage2 = new Chocolate(beverage5);
       System.out.println(beverage5.getDescription()
               + " $" + beverage5.cost());
   }
}

In: Computer Science

Name the two different kinds of friction and briefly describe them.          (6 marks) The data below...

  1. Name the two different kinds of friction and briefly describe them.         
  2. The data below for the instantaneous velocity v versus the time t were obtained in a level 300 student experiment. Perform a linear least square fit with v as the vertical axis and t as the horizontal axis.

v(m/s)

0.352

0.496

0.655

0.808

0.939

1.073

t(s)

0.200

0.400

0.600

0.800

1.000

1.200

Table 1: v versus t

Determine from the graph;

    1. Acceleration a
    2. Initial velocity vo - (Intercept)          
  1. Mention the equipment used to measure the following quantities in the laboratory and state their corresponding SI unit of measurements;
    1. Voltage
    2. Current

Magnetic flux density           

In: Physics

1. The estimated costs of producing 6,000 units of a component are: Per Unit Total Direct...

1. The estimated costs of producing 6,000 units of a component are:

Per Unit Total

Direct Material $10 $60,000

Direct Labor 8 48,000

Applied Variable Factory Overhead 9 54,000

Applied Fixed Factory Overhead 12 72,000

$1.5 per direct labor dollar

$39 $234,000

The same component can be purchased from market at a price of $29 per unit. If the component is purchased from market, some percentage of the fixed factory overhead will be saved.

a. Should the component be purchased from the market?

b. From the above, what is the relevant cost

2. What is relevant cost

a. What is management decision

b. Mention management decision tools

In: Accounting

8. What kind of sampling strategy would you use in the following situations? Take into consideration...

8. What kind of sampling strategy would you use in the following situations? Take into consideration the spatial and temporal variability you expect to encounter. What type of sampling would be preferred: grab sample, composite sample, or continuous monitoring?

a. To study the contamination of fish in a river where a chemical company has a waste water discharge outlet.

b. To identify accident release of chemicals by the industry mention above.

c. To implement strategies to reduce smog formation in your city.

d. To study the effect of auto exhaust on the air quality in your city.

e. To identify ground water contamination around an abandoned chemical factory.

f. To determine if apples from a sprayed orchard are contaminated with pesticides.

In: Chemistry

Your first patient this week has a problem of the genitourinary tract that has plagued him...

Your first patient this week has a problem of the genitourinary tract that has plagued him since birth. He has had many hospitalizations due to this problem and suffers repeatedly with difficulties of the genitourinary tract. Describe the problem using terms built from the genitourinary medical word elements in your text. Mention 3 tests or procedures that would help you understand or treat your patient.

The second patient for you this week is a woman with a problem involving the reproductive area. Describe the problem she has with words built from some of the reproductive medical word elements in your text. You need to include at least 3 tests or procedures needed to address her issue as well.

In: Nursing

Two friends are dividing a prize worth $10. Each of two players announces an integer a1...

Two friends are dividing a prize worth $10. Each of two players announces an integer a1 and a2 respectively between 0 and 10 both inclusive. If the sum of the numbers named is less than or equal to 10, they each get the number they named and the remainder is destroyed. If the sum a1 + a2 >10 and both claims are the same, then the prize is equally divided. If a1 + a2 >10 and the two integers named are different then minimum of the two claims gets the claimed amount and the other one gets the remainder if any.

Model as a strategic game

Does either player have any dominating strategy?

Is the game dominance solvable? If so, solve for the IEDS equilibrium to the game. If not, clearly mention the strategies that survive IEDS.

In: Economics

Suppose a small company that manufactures cereal bars own two scales that weigh their products (say...

Suppose a small company that manufactures cereal bars own two scales that weigh their products (say A and B). Quality control manager in this company is concerned that scale A is erroneous. He takes a sample of 20 cereal bars and weigh each of them using both scales A and B. Assume that you were given a spread sheet that include weights of the 20 cereal bars reported by two scales.

Explain how you would approach testing the QC managers’ concern. What type of tests/CI you would construct to help him make a decision? Mention of any assumptions you would check or any graphing techniques you would use to display the data.

In: Statistics and Probability

Your first patient this week has a problem of the genitourinary tract that has plagued him...

Your first patient this week has a problem of the genitourinary tract that has plagued him since birth. He has had many hospitalizations due to this problem and suffers repeatedly with difficulties of the genitourinary tract. Describe the problem using terms built from the genitourinary medical word elements in your text. Mention 3 tests or procedures that would help you understand or treat your patient.

The second patient for you this week is a woman with a problem involving the reproductive area. Describe the problem she has with words built from some of the reproductive medical word elements in your text. You need to include at least 3 tests or procedures needed to address her issue as well.

In: Nursing