they're essentially the same thing so i'd say yes
Answer:
#include <iostream>
#include <string>
#include "user.h"
#include "password.h"
using namespace Authenticate;
using namespace std;
int main()
{
inputUserName();
inputPassword();
cout << "Your username is " << getUserName() <<
" and your password is: " <<
getPassword() << endl;
return 0;
}
user.h:
#ifndef USER_H
#define USER_H
#include <string>
using namespace std;
namespace Authenticate
{
namespace
{
bool isvalid();
}
void inputUserName();
string getUserName();
}
#endif
user.cpp:
#include <iostream>
#include "user.h"
namespace Authenticate
{
string username="";
namespace
{
bool isvalid()
{
if(username.length() == 8)
return true;
else
return false;
}
}
void inputUserName(){
do
{
cout << "Enter your username (8 letters only)" << endl;
cin >> username;
}
while(!isvalid());
}
string getUserName()
{
return username;
}
}
password.h:
#ifndef PASSWORD_h
#define PASSWORD_h
#include <string>
using namespace std;
namespace Authenticate
{
namespace
{
bool isValid();
}
void inputPassword();
string getPassword();
}
#endif
password.cpp:
#include <iostream>
#include <string>
using namespace std;
namespace Authenticate
{
string password="";
namespace
{
bool isValid()
{
if(password.length() >= 8)
{
for(int i=0; i<password.length(); i++)
if(password[i] >= '0' && password[i] <= '9')
return true;
return false;
}
else
return false;
}
}
void inputPassword(){
do
{
cout << "Enter your password (at least 8 characters " <<
"and at leat one non-letter)" << endl;
cin >> password;
}
while(!isValid());
}
string getPassword()
{
return password;
}
}
Answer:
1. Parallel circuit
2. Parallel circuit
3. Series circuit
4. Series circuit
5. Parallel circuit
6. Parallel circuit
Explanation:
1. In a parallel circuit, there are multiple paths for current to flow. The path each current takes depends on the resistance of the resistors on that path.
2. In a parallel circuit, current splits up into various paths to get the total current through the circuit, the current flow through each resistor is added.
3. In a series circuit the voltage across each resistor is not the same. to get back the total voltage, the voltages across each resistor needs to be added.
4. Series circuits have voltage drops across each resistor. this makes the voltage across each resistor depend on the resistance of the resistor.
5. In parallel circuits voltage is the same across each resistor because they are all connected directly to the same source.
6. In parallel circuits, the power is the same in each resistor of equal resistance since the voltage across each resistor is the same
Answer:
E=1.969 × 10¹¹ Pa
Explanation:
The formula to apply is;
E=F*L/A*ΔL
where
E=Young modulus of elasticity
F=Force in newtons
L=Original length in meters,m
A=area in square meters m²
ΔL= Change in length in meters,m
Given
F= 8000 lb = 8000*4.448 =35584 N
L= 5 in = 0.127 m
A= 0.7 in² =0.0004516 m²
ΔL = 0.002 in = 5.08e-5 m
Applying the formula
E=(35584 * 0.127)/(0.0004516*5.08e-5 )
E=1.969 × 10¹¹ Pa
Answer:Its an electric train so there is no smoke so no where.
Explanation: