Questions
Given 2 objects moving at some velocity v relative to one another, is it possible to...

Given 2 objects moving at some velocity v relative to one another, is it possible to determine whether they are moving or whether the space between them is expanding?

In: Physics

Q.In case of f(F,p,D,V,Mu,g), express F as a function of other physical quantities through Buckingam-pi method.

Q.In case of f(F,p,D,V,Mu,g), express F as a function of other physical quantities through Buckingam-pi method.

In: Civil Engineering

How many 65-W lightbulbs can be connected in parallel across a potential difference of 80 V...

How many 65-W lightbulbs can be connected in parallel across a potential difference of 80 V before the total current in the circuit exceeds 2.0 A ?

In: Physics

V. Conclusion/action – Why is it important to practice counseling as a student pharmacist? What steps...

V. Conclusion/action – Why is it important to practice counseling as a student pharmacist? What steps will you take to ensure you provide optimal counseling in the future?

In: Nursing

Compare Hyper-V to virtualization offerings from Amazon, VMware, and Citrix, and others What are some of...

Compare Hyper-V to virtualization offerings from Amazon, VMware, and Citrix, and others What are some of the differences?

Which solution would you recommend to a manager?

In: Computer Science

if an 8-bit sar adc is used to digitize 8v full scale signal, what will be...

if an 8-bit sar adc is used to digitize 8v full scale signal, what will be the digital o/p for an analog i/p of 5.76 v

In: Computer Science

Find the volume V of a regular tetrahedron whose face is an equilateral triangle of side...

Find the volume V of a regular tetrahedron whose face is an equilateral triangle of side 8.

Find the area of the horizontal cross-section A at the level z=4.

In: Advanced Math

United States v. Barrington===Computer Crime.   Make an argument. Do you agree or disagree.   Search the internet...

United States v. Barrington===Computer Crime.  

Make an argument. Do you agree or disagree.  

Search the internet for this case, then search the book's PDF to find it.  

In: Computer Science

NEED TO BE IN PYTHON!!! Make sure to put the main section of your code in...

NEED TO BE IN PYTHON!!!

Make sure to put the main section of your code in the following if block:

# Type code for classes here

if __name__ == "__main__":

# Type main section of code here

(1) Build the Account class with the following specifications:

Attributes

  • name (str)
  • account_number (int)
  • balance (float)

Create a constructor that has 3 parameters (in addition to self) that will be passed in from the user. (no default values)

Define a __str__() method to print an Account like the following

Account Name: Trish Duce

Account Number: 90453889

Account Balance: $100.00

Define a deposit() method that has 1 parameter (in addition to self) that will be passed in from the user. (no default values) The method deposits the specified amount in the account.

Define a withdraw() method that has 2 parameters (in addition to self) that will be passed in from the user. (no default values) The method withdraws the specified amount (1st parameter) and fee (2nd parameter) from the account.

(2) In the main section of your code, create 3 accounts.

  • Trish Duce 90453889 100
  • Donald Duck 83504837 100
  • Joe Smith 74773321 100

(3) Print the 3 accounts using print(acct1)…

(4) Deposit 25.85, 75.50 and 50 into accounts 1, 2 and 3.

(5) Print the 3 accounts.

(6) Withdraw 25.85 (2.50 fee), 75.50 (1.50 fee), 50.00 (2.00 fee).

(7) Print the 3 accounts.

Output should look like the following:

Account Name: Trish Duce

Account Number: 90453889

Account Balance: $100.00

Account Name: Donald Duck

Account Number: 83504837

Account Balance: $100.00

Account Name: Joe Smith

Account Number: 74773321

Account Balance: $100.00

Account Name: Trish Duce

Account Number: 90453889

Account Balance: $125.85

Account Name: Donald Duck

Account Number: 83504837

Account Balance: $175.50

Account Name: Joe Smith

Account Number: 74773321

Account Balance: $150.00

Account Name: Trish Duce

Account Number: 90453889

Account Balance: $97.50

Account Name: Donald Duck

Account Number: 83504837

Account Balance: $98.50

Account Name: Joe Smith

Account Number: 74773321

Account Balance: $98.00

In: Computer Science

in c++ please follow instructions and fix the errors and please make a comment next to...

in c++ please follow instructions and fix the errors and please make a comment next to each code error you fix.

  • Below are 25 code fragments, inserted into a try catch block.
  • Each line has zero or more errors. Your task is to find and remove all errors in each fragment.
    • Do not fix problems by simply deleting a statement; repair the problems by changing, adding, or deleting a few characters.
    • There may be different ways to fix them
    • You may need to rename variables to avoid re-declaration errors
    • When you fix a line, it should print out "Success!" and then a newline.
  • You may want to comment out each line that you have not fixed yet in order to get it to compile, so you can test as you go
  • In the end you should see a total of 25 "Success!" outputs

#include "std_lib_facilities.h"
int main()
try
{
//1.
Cout << "Success!\n";
//2.
cout << "Success!\n;
//3.
cout << "Success" << !\n"
//4.
cout << success << '\n';
//5.
string res = 7; vector<int> v(10); v[5] = res; cout << "Success!\n";
//6.
vector<int> v(10); v(5) = 7; if (v(5)!=7) cout << "Success!\n";
//7.
if (cond) cout << "Success!\n"; else cout << "Fail!\n";
//8.
bool c = false; if (c) cout << "Success!\n"; else cout << "Fail!\n";
//9.
string s = "ape"; boo c = "fool"<s; if (c) cout << "Success!\n";
//10.
string s = "ape"; if (s=="fool") cout << "Success!\n";
//11.
string s = "ape"; if (s=="fool") cout < "Success!\n";
//12.
string s = "ape"; if (s+"fool") cout < "Success!\n";
//13.
vector<char> v(5); for (int i=0; 0<v.size(); ++i) ; cout << "Success!\n";
//14.
vector<char> v(5); for (int i=0; i<=v.size(); ++i) ; cout << "Success!\n";
//15.
string s = "Success!\n"; for (int i=0; i<6; ++i) cout << s[i];
//16.
if (true) then cout << "Success!\n"; else cout << "Fail!\n";
//17.
int x = 2000; char c = x; if (c==2000) cout << "Success!\n";
//18.
string s = "Success!\n"; for (int i=0; i<10; ++i) cout << s[i];
//19.
vector v(5); for (int i=0; i<=v.size(); ++i) ; cout << "Success!\n";
//20.
int i=0; int j = 9; while (i<10) ++j; if (j<i) cout << "Success!\n";
//21.
int x = 2; double d = 5/(x–2); if (d==2*x+0.5) cout << "Success!\n";
//22.
string<char> s = "Success!\n"; for (int i=0; i<=10; ++i) cout << s[i];
//23.
int i=0; while (i<10) ++j; if (j<i) cout << "Success!\n";
//24.
int x = 4; double d = 5/(x–2); if (d=2*x+0.5) cout << "Success!\n";
//25.
cin << "Success!\n";


keep_window_open();
return 0;
}
catch (exception& e)
{
cerr << "error: " << e.what() << '\n';
keep_window_open();
return 1;
}
catch (...)
{
cerr << "Oops: unknown exception!\n";
keep_window_open();
return 2;
}

In: Computer Science