Can you please at least give me some part of the code. At least how to start it in C++. Thank you!
Project 5: You will design and implement various classes and write a program to manage one of the following a bank, a hospital, a library, a business, an organization, etc.) The program must do the following:
1. Allow the initialization of the different attributes of the objects from the keyboard.
2. Allow the initialization of the different attributes from a file
3. Perform calculations on one (or more) of the attributes (e.g. calculateInterest, generateHospitalBill, calculateCheckedBooks, etc.)
4. Output a report of all objects created. The report called for by requirement 4 should output all information about each object. You will need to take advantage of the capabilities of C++ classes, inheritance and overriding.
Program Design:
1. Create at least one base class. All data members have to be private. Your main function and any function that it calls should use the member functions of this class for all transactions.
2. Create at least two derived class of the base class described in the previous point.
3. The program will maintain arrays of objects that interacts with each other to manage the designated establishment (bank, hospital, library, etc.). Please do not use anything more sophisticated than an array.
4. Keep the program simple. I am interested in whether you can demonstrate basic competence in the use of classes, inheritance, and good design.
5. All data members in the classes must be private. This is to assure that you use the C++ capabilities that this assignment is all about. Do not use any global variables.
6. When the user decides to quit the updated information is saved back to the secondary storage to give the user the option to either start fresh or continue where he/she left off at the beginning of the next execution

Answers

Answer 1

Answer:

Explanation:

The objective of this question is to  compute a program  that involve using  a  C++ code for  designing and implementing  a Bank Account Management Simulator with integrated file storage for saving details to secondary storage.

When writing this code I notice the words are more than 5000 maximum number of characters the text editor can contain, so i created a word document for it. The attached file  to the word document can be found below.


Related Questions

Translate each statement into a logical expression. Then negate the expression by adding a negation operation to the beginning of the expression. Apply De Morgan's law until each negation operation applies directly to a predicate and then translate the logical expression back into English.
Sample question: Some patient was given the placebo and the medication. ∃x (P(x) ∧ D(x)) Negation: ¬∃x (P(x) ∧ D(x)) Applying De Morgan's law: ∀x (¬P(x) ∨ ¬D(x)) English: Every patient was either not given the placebo or not given the medication (or both).(a) Every patient was given the medication.(b) Every patient was given the medication or the placebo or both.(c) There is a patient who took the medication and had migraines.(d) Every patient who took the placebo had migraines. (Hint: you will need to apply the conditional identity, p → q ≡ ¬p ∨ q.)

Answers

Answer:

Explanation:

To begin, i will like to break this down to its simplest form to make this as simple as possible.

Let us begin !

Here statement can be translated as: ∃x (P(x) ∧ M(x))

we require the Negation: ¬∃x (P(x) ∧ M(x))

De morgan's law can be stated as:

1) ¬(a ∧ b) = (¬a ∨ ¬b)

2) ¬(a v b) = (¬a ∧ ¬b)

Also, quantifiers are swapped.

Applying De Morgan's law, we have: ∀x (¬P(x) ∨ ¬M(x)) (∃ i swapped with ∀ and intersecion is replaced with union.)

This is the translation of above

English: Every patient was either not given the placebo or did not have migrane(or both).

cheers i hope this helped !!

You can add additional design elements to a picture by adding a color background, which is accomplished by using what Paint feature?
Pencil tool

Shapes tool

Color Picker tool

Fill with Color tool

Answers

Answer:

Fill with Color tool

Max magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a program that takes two integer inputs, and outputs the largest magnitude value. Ex: If the inputs are: 5 7 the method returns: 7 Ex: If the inputs are: -8 -2 the method returns: -8 Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math method. Your program must define and call a method: public static int maxMagnitude(int userVal1, int userVal2)

Answers

Answer:

The java program is as follows.

import java.lang.*;

public class Numbers

{

   //variables to hold two numbers

   static int num1=-8, num2=-2;

   //method to return integer with higher magnitude

   public static int maxMagnitude(int userVal1, int userVal2)

   {

       if(Math.abs(userVal1) > Math.abs(userVal2))

           return userVal1;

       else    

           return userVal2;

   }

public static void main(String[] args) {

    int max = maxMagnitude(num1, num2);

 System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

}

}

OUTPUT

The number with higher magnitude among -8 and -2 is -8

Explanation:

1. Two integer variables are declared to hold the two numbers. The variables are declared at class level (outside main()) and declared static.

2. The variables are initialized with any random value.

3. The method, maxMagnitude(), takes the two integer parameters and returns the number with higher magnitude. Hence, return type of the method is int.

public static int maxMagnitude(int userVal1, int userVal2)

4. This method finds the number with higher magnitude using the Math.abs() method inside if-else statement.

               if(Math.abs(userVal1) > Math.abs(userVal2))

                   return userVal1;

        else    

                   return userVal2;

5. Inside main(), the method, maxMagnitude(), is called. This method takes the two variables as input parameters.

6. The integer returned by the method, maxMagnitude() is assigned to a local integer variable, max, as shown.

      int max = maxMagnitude(num1, num2);

7. The result is displayed to the user as shown.

System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);

8. The class variables and the method, maxMagnitude(), are declared static so that they can be used and called inside main().

9. The variable, max, is called local variable since it can be used only within the main() where it is declared. It is not declared static.

10. The class is declared public since it has the main() method and execution begins with main().

11. The program is saved with the same name as the name of the public class having main(). In this case, the program is saved as Numbers.java.

12. No user input is taken for the two input parameter values. The static variables can be assigned any integer value and the program can be tested accordingly.

Write a Python program that can compare the unit (perlb) cost of sugar sold in packages with different weights and prices. The program prompts the user to enter the weight and price of package 1, then does the same for package 2, and displays the results to indicate sugar in which package has a better price. It is assumed that the weight of all packages is measured in lb. The program should check to be sure that both the inputs of weight and price are both positive values.

Answers

Answer:

This program is written using python

It uses less comments (See explanation section for more explanation)

Also, see attachments for proper view of the source code

Program starts here

#Prompt user for price of package 1

price1 = int(input("Enter Price 1: "))

while(price1 <= 0):

     price1 = int(input("Enter Price 1: "))

#Prompt user for weight of package 1

weight1 = int(input("Enter Weight 1: "))

while(weight1 <= 0):

     weight1 = int(input("Enter Weight 1: "))

#Calculate Unit of Package 1

unit1 = float(price1/weight1)

print("Unit cost of Package 1: "+str(unit1))

#Prompt user for price of package 2

price2 = int(input("Enter Price 2: "))

while(price2 <= 0):

     price2 = int(input("Enter Price 2: "))

#Prompt user for weight of package 2

weight2 = int(input("Enter Weight 2: "))

while(weight2 <= 0):

     weight2 = int(input("Enter Weight 2: "))

#Calculate Unit of Package 2

unit2 = float(price2/weight2)

print("Unit cost of Package 2: "+str(unit2))

#Compare units

if unit1 > unit2:

     print("Package 1 has a better price")

elif unit1 == unit2:

     print("Both Packages have the same price")

else:

     print("Package 2 has a better price")

Explanation:

price1 = int(input("Enter Price 1: ")) -> This line prompts the user for price of package 1

The following while statement is executed until user inputs a value greater than 1 for price

while(price1 <= 0):

     price1 = int(input("Enter Price 1: "))

weight1 = int(input("Enter Weight 1: ")) -> This line prompts the user for weight of package 1

The following while statement is executed until user inputs a value greater than 1 for weight

while(weight1 <= 0):

     weight1 = int(input("Enter Weight 1: "))

unit1 = float(price1/weight1) -> This line calculates the unit cost (per weight) of package 1

print("Unit cost of Package 1: "+str(unit1)) -> The unit cost of package 1 is printed using this print statement

price2 = int(input("Enter Price 2: ")) -> This line prompts the user for price of package 2

The following while statement is executed until user inputs a value greater than 1 for price

while(price2 <= 0):

     price2 = int(input("Enter Price 2: "))

weight2 = int(input("Enter Weight 2: ")) -> This line prompts the user for weight of package 2

The following while statement is executed until user inputs a value greater than 1 for weight

while(weight2 <= 0):

     weight2 = int(input("Enter Weight 2: "))

unit2 = float(price2/weight) -> This line calculates the unit cost (per weight) of package 2

print("Unit cost of Package 2: "+str(unit2)) -> The unit cost of package 2 is printed using this print statement

The following if statements compares and prints which package has a better unit cost

If unit cost of package 1 is greater than that of package 2, then package 1 has a better priceIf unit cost of both packages are equal then they both have the same priceIf unit cost of package 2 is greater than that of package 1, then package 2 has a better price

if unit1 > unit2:

     print("Package 1 has a better price")

elif unit1 == unit2:

     print("Both Packages have the same price")

else:

     print("Package 2 has a better price")

A small publishing company that you work for would like to develop a database that keeps track of the contracts that authors and publishers sign before starting a book. What fields do you anticipate needing for this database

Answers

Answer:

The database can include the fields related to the Author such as name and address, related to Publisher such as publisher's name and address, related to book such as title and ISBN of the book and related to contract such as payment schedule, contract start and end.

Explanation:

The following fields can be needed for this database:

Author First_NameAuthor's Last_NameAuthors_addressPublisher_namePublisher_addressBook_titleBook ISBNcontract date : this can be start_date (for starting of contract) and end_date ( when the contract ends) payment_made: for payment schedule.

Someone help me with this

Answers

Answer:

(b) public String doMath(int value){

return " " + (value * 3);

}

Explanation:

Two of the answers doesn't even have a variable to pass into. In order, to return a String the return " " in b will do this. Therefore, I think the answer is b.

Other Questions
Solve the system of equations by using substitutionY=2x+3Y=x+2 Is the food code (FDA) a federal law In case of head injury keep the person stillO TRUEO FALSE What is a thesis statement?A. a statement of purpose b. statement of factC. an observation related to the workD. a neutral point with minimum scope for debate The sum of the digits of a two-digit number is 14. If the number formed by reversing the digits is less than the original number by 18. Find the original numbers. If the coordinate of vertex A is (-2,4), then the coordinate of vertex A' is(-2,-4)(2,-4)(2, 4) The chemical groups into which hormones can be divided include What is the value of this discriminant? HELPP I dont get this at all. I originally got c but my teacher said it was incorrect. This is about volume and cylinders. Explanation needed At the beginning of year 1, Paolo invests $500 at an annual compoundinterest rate of 4%. He makes no deposits to or withdrawals from theaccount.Which explicit formula can be used to find the account's balance at thebeginning of year 5? What is the balance? Whats the cosine of U? Find the slope of the line on the graph.Write your answer as a fraction or a wholenumber, not a mixed number or decimal. If 9x+2y^23z^2=132 and 9y2y^2+3z^2=867, then x+y = look at the picture, type at least two ways they are the same and different. What is the equation in slope-intercept form of the line? Which of these shapes have rectangular cross sections when they are cut perpendicular to the base? Select three options.-rectangular prism-triangular prism-cylinder-cone-square pyramid-triangular pyramid 1. Investment in the business= $17,0102. Borrow cash= $76203. Purchase equipment= the list price was $8700 but the final price was $83004. Revenues earned = $298,600, the cash has been collected from the customers for all revenue earned5. Expenses incurred= total $210,900 during the same year, all expenses paid in cash6. Dividens= end of each quarter, the company distributed cash to stockholders, the sum of those quarterly distributions was $15,000Consider the following transactions for Thomas Company and their effect ont he accounting equation. Determine the new balance for each component of the accounting equation from the transactioon. If an amount box does not require an entry, leave it blank.Transaction Assets =Liabilities Stockholders' EquityBeginning $0 $0 $01. Investment in the business $17,160 17160 2. Borrow cash $7940 7940 79403. Purchase equipment 8600 7940 660 4. Revenues earned 29860 0 29860 5. Expenses incurred 210800 103660 6. Dividends 14200 88460 write as an algebraic expression Ignacio: Fui de vacaciones por veinte das. Marta: Cundo comenzaron tus vacaciones? Ignacio: _______. A. La semana pasada B. Anteayer C. Anoche D. El mes pasado 8. Which Greek pottery style featured figures in silhouette?Orientalizing styleArchaic styleBlack-figure styleDoric style