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

  Information technology and the changing fabric

Illustrations of concepts from organizational structure, organizational power and politics and organizational culture.

  Case study: software-as-a-service goes mainstream

Explain the questions based on case study. case study - salesforce.com: software-as-a-service goes mainstream

  Research proposal on cloud computing

The usage and influence of outsourcing and cloud computing on Management Information Systems is the proposed topic of the research project.

  Host an e-commerce site for a small start-up company

This paper will help develop internet skills in commercial services for hosting an e-commerce site for a small start-up company.

  How are internet technologies affecting the structure

How are Internet technologies affecting the structure and work roles of modern organizations?

  Segregation of duties in the personal computing environment

Why is inadequate segregation of duties a problem in the personal computing environment?

  Social media strategy implementation and evaluation

Social media strategy implementation and evaluation

  Problems in the personal computing environment

What is the basic purpose behind segregation of duties a problem in the personal computing environment?

  Role of it/is in an organisation

Prepare a presentation on Information Systems and Organizational changes

  Perky pies

Information systems to adequately manage supply both up and down stream.

  Mark the equilibrium price and quantity

The demand schedule for computer chips.

  Visit and analyze the company-specific web-site

Visit and analyze the Company-specific web-site with respect to E-Commerce issues

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