Sunday, August 2, 2009

An inspection procedure at a manufacturing plant involves picking three items at random and then accepting?

an inspection procedure at a manufacturing plant involves picking three items at random and then accepting the whole lot if at least two of the three items are in perfect condition. if in reality 80% of the whole lot is perfect, what is the probability that the lot will be accepted?





(a) .512


(b) .560


(c) .640


(d) .896


(e) .992





*please show how you arrived at your answer.

An inspection procedure at a manufacturing plant involves picking three items at random and then accepting?
Probability of all three being perfect (.8)(.8)(.8) =.512


Probability of two being perfect:


(.2)(.8)(.8) +(.8)(.2)(.8) + (.8)(.8)(.2) =.384


At least two perfect means you add these two up and get .896


So, the answer is (d)


Anyone know any good sites to find C++ tutorials that cover more then just the basic things?

Does anyone know a good site or sites to find tutorials for the C++ programming language? I've found a lot of sites but none of them go much farther then the very basics. A few of them have a couple random topics on more advanced things but not enough to really learn anything off of.

Anyone know any good sites to find C++ tutorials that cover more then just the basic things?
My suggestion is to get some books. Web sites aren't really suited to the long format that books are. It's really worth the money. If you are lucky you can find a library with them.





Some of the best authors are


Koenig %26amp; Moo


Herb Sutter


Scott Meyers


Bjarne Stroustrup


Andrei Alexandrescu - his book "Modern C++ Design" is a mind-bending template book. Seriously advanced stuff.





You can find excellent book reviews at accu.org. In fact you should check every book you buy through there. This way you skip the junk. Some books teach bad things and have negative value.
Reply:I would use Thinking in C++ V1 and V2. After that, I'd be looking at the C++ FAQs book.





There are good forums and mailing lists that have experts in C++. I'll go to those places to find answers to my questions after I fail to find answers from these books.





Thinking in C++ is worth a buy.
Reply:go through google
Reply:You can check programming tutorial websites like http://myitcareer.org/


How do i simulate a Nasa space shuttle based on debris impact in C++?

The program will define a two dimensional incident zones, one for the shuttle’s wing section and the body. These 2-D incident zones provide a coordinate system that identifies the location of random debris in the shuttle’s forward path. The identifying locations within a zone are called cells, as illustrated in the diagram below, and is identified by two coordinates for the x and y dimensions.





Each cell has an associated “impact resistance factors” (IRF) for tiles located in the shuttle’s body and wing sections. The IRF is a hardness measure of the various tiles, and a higher IRF indicates a harder tile. An IRF %26lt; 0 indicates that a particle cannot make contact with the shuttle in the corresponding cell and zone. Important: Assume that a particle passing through a cell will strike the shuttle if any part of that cell contains part of the shuttle.


program will perform the following actions for each simulated particle:


a) Randomly select whether the particle is incident on the wing or body. A given particle can only be incident on one. Keep track of the total particle incidents for each incident zone during the simulation.


b) Randomly generate valid x and y coordinates for the incident zone which indicate that the current debris particle in the simulation is incident in the (x, y) cell of the body or wing zone (randomly selected in the previous step).


c) Keep a count Cx,y of the total debris incidents for each body and wing cell.


d) Generate a random force F, where 0 %26lt; F %26lt; 0.50 for each particle incident. F is the force of impact if the particle collides with the shuttle’s ceramic tile.


e) Maintain the average force, (FAVG)x,y in per-cell detail of particles that impact the shuttle

How do i simulate a Nasa space shuttle based on debris impact in C++?
Correlate each of these points with the specific portions of the question based on the numbering.


a) Fix the number of tiles you have in a shuttle (say N). Generate a random number using a pseudo Random number generator (lets call it R1). If the random number generated is between 0-1/N then the particle strikes tile 1, between 1/N-2/N it strikes tile 2 and so on... (that answers both a and b)


b) Maintain a counter per tile to record the number of hits.


c) Use another random number generator (R2) to generate the force of the particle hitting the tile.





So you need a tile structure which looks like this:


class Tile


{


private:


int x, y; //location


int hitCount;


double averageForce;


public:


Tile(int x = 0, int y = 0) : x(x), y(y) {}


~Tile () {}


void setLocation (int x, int y); // to set the co-ordinates


void hit (double force); // this should recompute average force


};





main()


{


Tile tiles[1000]; //how many ever you want.


for (int i = 0; i %26lt; 1000; i++)


//set location of all tiles





while (...)


{


double r1 = random ();


double force = drand48(); // use appropriate seeds


if (r1 %26lt; 1/1000)


tiles[0].hit (force);


}


}

community survey

How much experience with C++ would you need to save High Scores? Also, can you help me?!?

I have a simple program. A Random Number Generator makes a number, from 1,000, and the user guesses it, and continues to guess it until they get it right, and it records the guess taken. I want to know how I could save the amount of guesses in a high score type way, how much experience I would need to do that, and if I could do it by saving the lowest amount of guesses. Yeah, I'm a newb.





Also, I'm using Dev-C++ for my compiler.

How much experience with C++ would you need to save High Scores? Also, can you help me?!?
You can create an output stream file object and write the names and scores in a file...





for recording a score:


If you have a loop for guessing, include an incremental variable in the loop, such as:





score++;


So that every time you ask, it increments the score by 1.











for saving:





#include %26lt;fstream%26gt;


#include %26lt;string%26gt;





ofstream myfile;


myfile.open ("example.txt");


cout %26lt;%26lt; "What is your name?";


string name;


cin %26gt;%26gt; name;


myfile %26lt;%26lt; name %26lt;%26lt; score;


myfile.close();











Include something like that in your code :)


Please pelase please how c an i do that or start it plz??

how can I start and hold a conversation with a random girl. in club or on beach how to build strong, long lasting connections with the girl i mean make her involved more and more . (*how c an i open a lovely funny I mean I can get that attractive glare from them and whatnot, but usually when I walk up to talk to them, I run short of what to say because I'm nervous,the things that was on my mind theya r e mpty to go out my mouth :( and I often look away allot mid conversation because of what they might think of my face, and instead of concentrating on the convo, I concentrate on what she is thinking (and sometimes bad breathe), so sometimes I hold my convos really short because of bad breath (how can I get rid of it??) And usually when you talk to someone you observe their features right ? ? Well I don't allow that when I'm close enough to a person, I will talk to someone face to face if we have distance. Now I know I'm an attractive person, because every girl in my group o

Please pelase please how c an i do that or start it plz??
You need to relax. Just be yourself and converse casually and smile alot. Do not keep looking away as it shows you are not really interested in what she has to say and is taken negatively. its okay to be nervous and many people are. Just take it slow and be yourself.


How to go about writing a program in C for a Memory Card game?

Ok I am using c programming to program a game. 9 cards from ace to 9 of the same suit are to be displayed to the user in a random order and then asks the user to locate a specific card and the user has to locate the correct position, based on c programmin i plan to store the cards in an array. and when the user locates the card they will b giving the address of that card in the array.





Any ideas how i can go about doing this and most importantly how can i go about with the user interface of it?

How to go about writing a program in C for a Memory Card game?
Does not look easy, may be you can contact a C expert live at website like http://askexpert.info/ .
Reply:yes.


A brick company found that 4% of its bricks were defective. If 400 bricks are checked at random, what is the?

A brick company found that 4% of its bricks were defective. If 400 bricks are checked at random, what is the probability that there are more than 22 defective bricks?








a. 0.2618





b. 0.1859





c. 0.1254





d. 0.0486





e. 0.0150





f. none of these

A brick company found that 4% of its bricks were defective. If 400 bricks are checked at random, what is the?
This probability can be approximated using a normal approximation. That is because





np = 400(0.04) = 16 %26gt;= 5 and


n(1-p) = 400(0.96) = 384 %26gt;= 5.





So, we will use a normal where





mean = np = 16 and


sd = sqrt{np(1-p)} = sqrt(400*0.04*0.96) = 3.92.





Since we are using the normal, then we will have to make a correction on the 22. Since we want to find the proportion above 22, but not including 22, then we will want to start at 22.5 and shade to the right on our normal. So now this is just a normal, so find z.





z = (22.5-16)/3.92


= 1.66





Using the standard normal table, you get the area to the right as 0.0485, so the answer is d.
Reply:f
Reply:B?

order flowers