Write a C++ program to calculate the time to drain a cylindrical water tank for an initial water height ranging from 1 to 10 feet (specifically for 1, 2, 4, 6, 8, and 10 ft). The tank has a radius (rt) of 2 feet and the drain radius (rd) is 0.3 inch. The gravitational constant (g) is 32.2 feet/sec2.
The formula for time to drain the tank is
time=(rtrd)2h/vavg
where, average velocity, vavg=0.5(2gh).5
In your program, assign the values to the variables rt, rd, and g. Prompt user to enter the value of h. The program should calculate the value of vavg, and then display time in hours.
Using MS Visual Studio, create a project folder called tank and a source code file tank.cpp.
Use the function pow() in the formulas and NOT sqrt().
Set up the output statements (cout) such that the one line display looks like the following:
Initial water height (ft.) = 1; Time to drain (hrs.) = 0.44
STEP 1: Analyze the Problem –
There is only one required output (time in hour of data type double) and one input (initial water height in ft of data type int). All intermediate variables will be assigned a data type of double.
STEP 2: Develop a Solution –
Pseudo code is shown below.
Convert all input data to the same unit (ft)
Display a prompt to enter initial height of water
Read a value for the height
Calculate average velocity, using the given formulas
Display the calculated time
Hand calculation for h = 1 ft, rt = 2 ft, rd = 0.3 inch, and g = 32.2 ft/sec2:
time = ?
STEP 3: Code the Solution -
You can start the program as shown below:
// Filename:
// C++ program to calculate time to drain water tank
// Written by: Your Name ON: Date
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
int h;
double rt = 2.0, rd = 0.3, g = 32.2;
double vavg, time;
// Input initial water height (h)
//---
// Set output formats
cout << setiosflags(ios::fixed)
<< setiosflags(ios::showpoint)
<< setprecision(2);// Calculate average velocity in ft/hr
//---
// Calculate time in hrs to drain
// NOTE: The function pow(double a, int n) returns an
//---
// Display results in the specified format
//---
return 0;
}
STEP 4: Test and Correct the Program -
If the program shows the correct output, copy and paste the output into MS Word. Also copy and paste the source code to the word processor as well. To copy the display window contents, click on the small black box in the upper left corner, select Edit -> Select All, then click again on the box and select Edit -> Copy.
Test the code by changing initial heights to 2, 4, 6, 8, and 10 feet.
In: Computer Science
JAVA Program
Write a program that prompts the user for data until the user wishes to stop (you must have a while loop)
(You must read in at least 8 to 10 sets of voter data using dialog boxes)
The data to read in is:
You will then print the following statistics:
Design help with this assignment:
First, make sure you can read in all data. Then take one requirement at a time and print that result. For example, count the number of people for Trump and the number of people for Biden and print that out. Then move on to the next requirement.
Again, thanks in advance. I need to check my work with an expert's help before the following Tuesday. Virtual schooling leaves me no choice but to post on here to learn my mistakes. Please post the java code, and output, as well as a screenshot of both.
In: Computer Science
Case 2 Running Free Dog owners constitute a large target market. Most members share something in common: the desire to let the pet run free and unfettered. If other friendly dogs are nearby and want to play—all the better. The Running Free Dog Park was created to meet this need for owners in the greater Atlanta area. Out-of-home advertising can be the critical component of an IMC program and, in some cases, the primary medium. To help launch the new venture, a local advertising agency created a feeling of expectancy and mystery with a “Running Free Dog Park” campaign. The first billboard displayed a dog tied up with a leash; however, it was only a partial picture. The unfinished nature of the image helps capture interest. Next, the same dog is shown with an unfastened leash and the word “running” appears beneath the pet. In the final billboard, the dog appears unfetters, the leash is gone, and the message “Running Free Dog Park” appears. The billboard displays the services offered, the website address of the park, and the location of the park. In addition to billboards, street kiosks and bus wraps were used to get the message out. Three unleashed dogs in the grass of a park. A dog park can be marketed as a place for pets to run free. The early results of the campaign were positive. Many dog owners became aware of the new park. What followed represented common challenges in marketing communications: sustaining initial interest, moving consumers to action, and building repeat business. In this next phase, dog owners needed to be encouraged to try the facility. They should be led to believe that the price of entry was a value. Then, over time, they can be enticed to make return visits and to offer word-of-mouth referrals to other pet owners. Only if these objectives can be attained will the initial success of the Running Free campaign become validated. 7-48.Define the marketing goals for the second phase of the Running Free Dog Park promotional efforts.
7-49.How would the three-exposure hypothesis or recency theory apply to this advertising program in its initial stages? What about the second campaign after consumers are aware of the dog park?
7-50.Which traditional advertising media should the marketing team use for the second campaign? Discuss the pros and cons of each in terms of the Running Free Dog Park campaign and the desire to stimulate trial usage.
7-51.How could social media and nontraditional media be used to supplement a traditional media campaign in this circumstance?
7-52.Design a newspaper ad and an out-of-home ad that will be placed at Little League baseball parks in the area. Explain why having these two ads in different media is better than having two ads within the same media.
In: Operations Management
Total Quality Management Sec-2 with Dr. Alamelumangai Raman for Sem
2 2020
Home
My courses
BS BAHR3102-2 AM 2020-2
Final Online Assignment - BAHR3102 - TOTAL QUALITY MANAGEMENT
Final Online Assignment Questions
Question 1
Not yet answered
Marked out of 10.0
Not flaggedFlag question
Question text
A1.
1.Al Raffa Company reported the following costs for a month.
S.no
Activity
Amount In OMR
1
Quality Planning
1000
2
Service Audit
1500
3
Cost of Rework
2000
4
Cost of Retesting
2500
5
Customer Complaints
3000
Answer the following:( 5*2=10 Marks)
A. How much amount is spent on external failure costs and explain how the company can overcome the cost?
B. How much amount is spent on internal failure costs and explain how the company can overcome cost?
C. How much amount is spent on appraisal costs and explain how the company can overcome cost?
D. How much amount is spent on preventive costs and explain how the company can overcome cost?
E. What were the total quality costs of Al Raffa
Company for the month and explain the total quality cost?
Answer in the Word document (ANSWER SHEET) and Upload as attachment below
Question 2
Not yet answered
Marked out of 10.0
Not flaggedFlag question
Question text
B1.
Case Let Analysis:
Oman Commercial Vehicle Manufacturer Company is one of the largest companies in the Sultanate of Oman. It is the third-largest manufacturer of passenger cars. Extensive quality enhancement and cost reduction task was initiated in September 2018. The outcome of this task helped the company to reach a profit of 28 million while the loss in the year ended March 2017 was 500 million.
The company followed the cost cutting system and saved more than 300 million of the company’s expenses over the last two years. The positive turnaround of the cost-cutting resulted in huge money gain, which does not even go beyond the projection. The vice president of the company Mr. Ahmed, who is at the manufacturing, was given the title of “Cost-cutting champion”, and he oversee the entire initiative.
Four Specific Areas Were Identified
· Direct material costs (which constitute roughly 65 per cent of all costs);
· Variable conversion costs (power, fuel, water, tools, etc.);
· Fixed costs- (labour, marketing, corporate expenses, plant operations, research, and development).
· Financial restructuring (working capital, debt restructuring, balance sheet, etc.).
In order to implement, drive and monitor the across the organization, three teams are formed namely— members, leaders and champions. The teams focused on cost-cutting measures, getting back the company to financially stable. For better communication across the company, employees were co-opted.
In order to achieve quality management project goals and cost-cutting exercise, which go simultaneously, employees helped each other. More importantly, the message conveyed to the employees was cost cutting measures were no way cutting corners. The employees in the same teams were involved in both exercises. This resulted in many win-win situations.
Answer the Following Questions:
1. List and explain the roles of teams in the above case. Any four
2. Identify and explain the four specific areas that Mr. Ahmed identified and how this cost plays essential roles in reducing the expenses for the organization.
3. List and explain the roles of top management related to the above case. Any two.
Answer in the Word document (ANSWER SHEET) and Upload as attachment below
Question 3
Not yet answered
Marked out of 10.0
Not flaggedFlag question
Question text
C1.
The organization must adopt necessary tools and strategies for the
support development, and advance a process of continuous
improvement – Keeping this mind
Answer the Following Questions:
A. Select any three quality management tools that are necessary for a service organization and explain in detail.
B. State the advantages of this three tools and explain how it can be used in the service organization.
C. What are the challenges that you will be facing
when you are using this tools? Any four
Answer in the Word document (ANSWER SHEET) and Upload as attachment below
Question 4
Not yet answered
Marked out of 10.0
Not flaggedFlag question
Question text
D1.
Answer the following questions:(5*2 =10
Marks)
D1
A. Identify the name of the chart and explain the related concept.
B. When should we use this chart?
C. What are the problems should be attempted on priority? Justify. Any two.
D. Is there any rule to be followed in the chart? Justify
E. What are the advantages of
using this chart? List and explain any two.
Answer in the Word document (ANSWER SHEET) and Upload as attachment below
Question 5
Not yet answered
Marked out of 10.0
Not flaggedFlag question
Question text
E1.
Case Let Analysis :
Al Ayan Company is one of the medium level company producing play toys for children in Sultanate of Oman. Since last year, the company has been receiving increasing complaints on the quality and durability of toys. The company wanted to address this issue very seriously. The company benchmarked with another play toy company and planned to concentrate on Quality aspects such as the material used, cost of the material, no of defects, scrap items etc. The company wants to improve the image in public and make sure that the company manufacture toys with high quality.
Answer the following questions
A. Identify and explain the level of benchmarking used by Al Ayan Company. Any three points.
B. Link the case related to the four phases of benchmarking and explain in detail.
C. If Al Ayan adapts Deming’s Principles, will it improve the image of the company in public? Justify with any two principles.
In: Accounting
INSERT STRING INTO SEPARATE CHAIN HASHTABLE & ITERATE THROUGH HASHTABLE: JAVA
_________________________________________________________________________________________________________________
import java.util.*;
public class HashTable implements IHash {
// Method of hashing
private HashFunction hasher;
// Hash table : an ArrayList of "buckets", which store the actual
strings
private ArrayList<List<String>> hashTable;
/**
* Number of Elements
*/
private int numberOfElements;
private int numberOfBuckets;
/**
* Initializes a new instance of HashTable.
* <p>
* Initialize the instance variables. <br>
* Note: when initializing the hashTable, make sure to allocate each
entry in the HashTable
* to a new a HashBucket or null, your choice.
* @param numberOfBuckets the size of the hashTable
* @param hasher the type of hashing function
*/
public HashTable(int numberOfBuckets, HashFunction hasher) {
this.hasher = hasher;
this.numberOfBuckets = numberOfBuckets;
this.hashTable = new ArrayList<>();
for (int i = 0; i < numberOfBuckets; i++) {
hashTable.add(null);
}
this.numberOfElements = 0;
}
public boolean insert(String key) { // THIS METHOD NEEDS
HELP
int bucketToPlaceIn = hasher.hash(key) %
numberOfBuckets;
List<String> bucketContents =
hashTable.get(bucketToPlaceIn);
// if bucketToPlaceIn is null
// initialize bucketContents
// set hashTable at bucketToPlaceIn
equal to bucketContents
// if bucketContents doesn't contain the key
// add it
// return true
return false;
}
public boolean remove(String key) {
for (int i = 0; i < hashTable.size(); i++) {
for (int j = 0; j <
hashTable.get(i).size(); j++) {
if
(hashTable.get(i).get(j) == key) {
hashTable.get(i).remove(j);
return true;
}
}
}
return false;
}
public String search(String key) {
for (int i = 0; i < hashTable.size(); i++) {
for (int j = 0; j <
hashTable.get(i).size(); j++) {
if
(hashTable.get(i).get(j) == key) {
return key;
}
}
}
return null;
}
public int size() {
int returnSize = 0;
for (int i = 0; i < hashTable.size(); i++) {
returnSize +=
hashTable.get(i).size();
}
return returnSize;
}
public int size(int index) {
int returnSize = hashTable.get(index).size();
return returnSize;
}
// Return iterator for the entire hashTable,
// must iterate all hashBuckets that are not empty
public class HashIterator implements Iterator<String> {
// The current index into the hashTable
private int currentIndex;
// The current iterator for that hashBucket
private Iterator<String> currentIterator = null;
HashIterator() { // THIS METHOD NEEDS HELP
// YOUR CODE HERE
}
public String next() { // THIS METHOD NEEDS HELP
// YOUR CODE HERE
return null;
}
public boolean hasNext() { // THIS METHOD NEEDS HELP
// YOUR CODE HERE
return false;
}
}
// Return an iterator for the hash table
public Iterator<String> iterator() { // THIS METHOD NEEDS
HELP
// YOUR CODE HERE
return null;
}
/**
* Does not use the iterator above. Iterates over one bucket.
*
* @param index the index of bucket to iterate over
* @return an iterator for that bucket
*/
public Iterator<String> iterator(int index) {
List<String> bucket = hashTable.get(index);
return bucket != null ? bucket.iterator() : null;
}
// Prints entire hash table.
// NOTE: This method is used extensively for testing.
public void print() {
Debug.printf("HashTable size: " + size());
for (int index = 0; index < hashTable.size(); index++)
{
List<String> list = hashTable.get(index);
if (list != null) {
Debug.printf("HashTable[%d]: %d entries", index,
list.size());
for (String word : list) {
Debug.printf("String: %s (hash code %d)", word,
hasher.hash(word));
}
}else {
Debug.printf("HashTable[%d]: %d entries", index, 0);
}
}
}
}
FOR REFERENCE
// HashInterface.java - interface for hashing assignment
import java.util.Iterator;
public interface IHash {
/** Add a key to the hash table, if it is not currently in the
table
* @param key - the key to add
* @return true on success, false on failure (duplicate)
*/
public abstract boolean insert(String key);
/** Remove a key from the hash table
* @param key - the key to remove
* @return true on success, false on failure (not in table)
*/
public abstract boolean remove(String key);
/** Search for a key in the hash table
* @param key - the key to search for
* @return the key on success, null on failure (not in table)
*/
public abstract String search(String key);
/** Get the number of elements in the hash table
* @return the number of elements in the table
*/
public abstract int size();
/** Get the number of elements in the hash table at the given
index
* @param i the index in the hash table (0 to size-1)
* @return the size of the list in the i<sup>th</sup>
bucket
*/
public abstract int size(int i);
/** Get an iterator that return the Strings stored in
* the hash table one at a time. The order should be in order of
entries in
* the hash table itself and for a given bucket, the order in that
list.
* @return an Interator
*/
public abstract Iterator<String> iterator();
/** Get an iterator for the i<sup>th</sup>
bucket
* @param i the index in the hash table (0 to size-1)
* @return null if the bucket is empty, otherwise an iterator for
the bucket
*/
public abstract Iterator<String> iterator(int i);
/** Print the entire hash table.
*/
public abstract void print();
}
@FunctionalInterface
interface HashFunction {
int hash(String key);
}
public class Hasher {
// Hashing algorithms, see specification
/**
* Hashing algorithms, see provided documentation in
assignment
* @param hashFunction FIRST, SUM, PRIME, OR JAVA
* @return the corresponding HashFunction
*/
public static HashFunction make(String hashFunction) {
switch (hashFunction) {
case "FIRST":
return (String key) -> {
return
Math.abs(key.charAt(0));
};
case "SUM":
return (String key) -> {
int sumReturn = 0;
for (int i = 0; i <
key.length(); i++) {
sumReturn +=
Math.abs(key.charAt(i));
}
return sumReturn;
};
case "PRIME":
return (String key) -> {
int sumReturn = 7;
for (int i = 0; i <
key.length(); i++) {
sumReturn = (31*sumReturn) +
Math.abs(key.charAt(i));
}
return sumReturn;
};
case "JAVA":
return (String key) -> {
return key.hashCode();
};
default:
usage();
}
return null;
}
// Usage message
private static void usage() {
System.err.println("Usage: java Hasher <FIRST|SUM|PRIME|JAVA>
<word>");
System.exit(1);
}
// Test code for hasher
public static void main(String[] args) {
args = Debug.init(args);
if (args.length != 2)
usage();
HashFunction sh = make(args[0]);
int hashCode = sh != null ? sh.hash(args[1]) : 0;
System.out.printf("'%s' hashes to %d using %s\n", args[1],
hashCode, args[0]);
}
}
In: Computer Science
Learning Goal: To understand the continuity equation.
Streamlines represent the path of the flow of a fluid. You can imagine that they represent a time-exposure photograph that shows the paths of small particles carried by the flowing fluid. The figure shows streamlines for the flow of an incompressible fluid in a tapered pipe of circular cross section. The speed of the fluid as it enters the pipe on the left is v1. Assume that the cross-sectional areas of the pipe are A1 at its entrance on the left and A2 at its exit on the right.

Part A
In: Physics
Learning Goal: To understand the continuity equation.
Streamlines represent the path of the flow of a fluid. You can imagine that they represent a time-exposure photograph that shows the paths of small particles carried by the flowing fluid. The figure shows streamlines for the flow of an incompressible fluid in a tapered pipe of circular cross section. The speed of the fluid as it enters the pipe on the left is v1. Assume that the cross-sectional areas of the pipe are A1 at its entrance on the left and A2 at its exit on the right.

Part A
Find F1, the volume of fluid flowing into the pipe per unit of time. This quantity is also known as the volumetric flow rate.
Express the volumetric flow rate in terms of any of the quantities given in the problem introduction.
Part B
Because the fluid is assumed to be incompressible and mass is conserved, at a particular moment in time, the amount of fluid that flows into the pipe must equal the amount of fluid that flows out. This fact is embodied in the continuity equation. Using the continuity equation, find the velocity v2 of the fluid flowing out of the right end of the pipe.
Express your answer in terms of any of the quantities given in the problem introduction.
Part C
If you are shown a picture of streamlines in a flowing fluid, you can conclude that the __________ of the fluid is greater where the streamlines are closer together.
Enter a one-word answer.
In: Physics
This is a written assignment that you must conduct exploratory research on how the government internalizes negative externality (you only need one market or one product or one activity).
Recall negative externalities occur in many markets; for example, oil production, manufacturing, transportation, and smoking, etc.
Please make sure that:
1. You clearly identify the market (product or activity) that causes negative externalities, which means the negative externalities must be also well defined. These could be shown with good statistics and proper in-text citations (and references.)
2. You are to write a summary of the policy implemented in the market of your choice. Again, properly if you use any direct quotes or statistics from the sources, you must cite the sources properly.
3. You then will upload your short exploratory paper in a word document or pdf file to Canvas.
The research should not exceed 2 pages (double-spacing), excluding the abstract and reference page, and you must have at least two outside sources for your writing. A successful paper requires you to perform research, craft an argument, and cite references to support your statements. I might ask for you to show me the sources you use, so please have them available.
In: Economics
Unix/Linux
1)
Use the find command to find all directories under /pub/cs/ whose
name is cs160a. Be sure to only display the results that match, do
not display any error output.
Hint: use: 2>/dev/null.
2)
Create a one-line command, using he famous.dat file, to add the
word " STREET" to the address, for all who live on 2nd or
3rd.
For example: '2nd' becomes "2nd STREET" and '3rd' becomes "3rd
STREET".
Display only the first 9 lines.
Hint: use 2 sed statements with pipes.
3)
Display all lines in famous.dat that end in 0 or 1, and have a 1 in
the 3rd from the last column.
For example lines ending in 120 and 131 would be displayed.
4)
Display all lines in famous.dat that have only 4, 5, 6, 7 and 9 in
the zip code.
HINT: this is the same as NOT 0,1,2,3 or 8.
5)
Using only the grep command, search all files with names that end
in either .html or .htm under the$HOME/public_html directory and
display any lines that contain body tags (containing
''). No other output should be displayed even if there
is no public_html directory.
Hint: use two command arguments and 2>
In: Computer Science
Business Scenario from Textbook BUSN11:
In the nation where Klaus lives, there are four very large manufacturers of furniture. Klaus and some very wealthy friends want to establish Number Five in the furniture manufacturing industry. Their strategy is quite simple and straight forward. They will quickly establish their new firm in the market and will sell all their products at lower prices than currently exist in the market. "We can have our company up and running within six months," Klaus confidently tells one of the prospective investors. An advisor says to Klaus: "These friends who want to back you financially, are they millionaires?" Klaus answers, "Not necessarily. They're just sharp business people who want to get a new firm started in an industry that is looking for some new ideas, some new blood." Soon the word has spread throughout the furniture industry that Klaus and friends are about to make a move. Then, Klaus gets a phone call: "Klaus, this is Ted Willkur of Willkur Furniture, and I'd like for you and me and some of my furniture colleagues from the other firms to have lunch together out at the country club. Interested?
Question: Which basic degree of competition are we seeing in this short case scenario? Explain why you have come to this conclusion.
In: Economics