Write a method to randomly populate the array

Assignment Help Management Information Sys
Reference no: EM131269973

Question:

Write a method to randomly populate the array of 25 integers with an integer value between 1 and 365 for each slot.

Write another method to check if two or more slots have the same integer. If so, then a match was found.

If not, repopulate the array and try again. Calculate average number of repopulations needed before a match is found.

If it takes on average, say, 5 tries to find a match, then the probability of 2 slots having same value on any random try is 1/5 or 20%.As owner of a new business, you have managed to get 25 loyal customers. In order to make them feel connected to your business, you want to send them cool birthday cards. Your best friend tells you that you should stock a couple of cards at least. You like to always do things Just in Time, and besides you may lose that extra card if you buy more than one. So you feel you should just buy one card before each birthday. Your friend (who took a basic probability class in college) insists that the probability of two people out of 25 having the same birthday (same date, different year) is higher than one would think. Neither of you has looked at the birthday dates of the 25 customers, and you are arguing this over lunch when you are vacationing for a week with your friend. You happen to have your laptop handy and decided to write a program to prove your friend wrong!

Please write a web page that calculates the probability that at least 2 people out of 25 have the same birth-date (different year is fine as long as they have the same date). Business implication: If the probability is higher than 50%, you'd probably want to keep a couple of cards handy.

Hints: We need to use the fact that there are 365 dates in a year. We need to use an array of 25 integers, where each integer is randomly generated between 1 and 365. We need to carefully study the code and email sent to us regarding calculating the probability of getting the same total if we roll two pairs of dice

Reference no: EM131269973

Questions Cloud

What is the purpose of the sql select command : How does the SQL SELECT command relate to the relational Select, Project, and Join concepts?
President of the south african clothing : Suppose you are the President of the South African Clothing and Textile Workers Union in South Africa and you have been requested by various clothing manufacturers to prepare a case for the introduction of new barriers to international trade in th..
What is structured query language : Name several of the fundamental SQL commands and discuss the purpose of each.
Discuss the difference between an import tariff : Discuss the difference between an import tariff and an import quota as methods of restricting trade. Which of the two methods would you recommend to your government and why?
Write a method to randomly populate the array : MIS 3023 - Business Programming Concepts - Write a method to randomly populate the array of 25 integers with an integer value between 1 and 365 for each slot.
Illustrating key economic concepts in economics : Discuss the production possibility frontier (PPF) and also highlight the importance of this model in illustrating key economic concepts in Economics. (Use diagrams and examples to motivate your answer)
What specific factors about police interrogative tactics : What type of personality assessment instrument will you want to use to either identify or rule out the characteristics listed in question 2? Be specific and support your answer: Identify at least one psychological test that can be used and include..
Retrieve all of records of the file physically sequentially : The value 009 appears as a ship number once in the Ship file and four times in the Crew Member file. Does this constitute data redundancy? Explain.
Find the total amount of the drug : Find the total amount of the drug that is assimilated into the bloodstream during the first 10 minutes after the pill is taken.

Reviews

Write a Review

Management Information Sys Questions & Answers

  Internet and the technologythe future of the internet phone

internet and the technologythe future of the internet phone. i do not want to discuss the history of the internet phone

  What would you recommend kyle baxter do

Identify the business issues that are leading BMC to consider a new application. What are the key factors for Baxter in making the buy vs. build decision?

  How is the value of it assessed in your organization

What is the level of IT-business integration for your organization? How is the value of IT assessed in your organization? How might your organization improve IT strategic alignment with business

  Analyze proper physical access control safeguards

Suggest three (3) logical access control methods to restrict unauthorized entities from accessing sensitive information, and explain why you suggested each method. Analyze the means in which data moves within the organization and identify techniq..

  Service contract a permissible focal point for coupling

Why is the service contract a permissible focal point for coupling in a service? What characteristics of the service contract will allow the service to evolve even when loosely coupled to logic and to customers?

  State the sample size and margin of error

Determine the following information for the selected poll results and include in your initial post: URL for the website, Using your own words, state the topic of the poll in a full sentence. State the sample size and margin of error

  Explain the basic components of a project management plan

Explain the basic components of a project management plan and its importance in improving the success of information technology projects.

  Define possible strategy for converting their old erp system

You are preparing to meet with your end users to discuss possible strategies for converting their old ERP system to a new one. Propose two (2) or three (3) alternative strategies, and explore related examples of situations for which each approach ..

  Collaboration tools based on your knowledgeas we create new

collaboration tools based on your knowledgeas we create new and better ways to collaborate - what happens to

  Advantages of computer-based medical recordsthe office

advantages of computer-based medical recordsthe office manager of the physician practice office where you work has

  Key supply management issuesmy boss was hired as vice

key supply management issuesmy boss was hired as vice president of supply management for the company and was told by

  Define typical attacks make reference to corresponding layer

With limited time and resources your manager wants everyone to suggest the structure of a network defense system to protect the computers and the network. Since this is an open discussion if your favorite idea has been discussed "to death" pick th..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd