Write a program in Matlab where the program plays a hot and cold game. The user answers two inputs: x=input('what is the x location of the object?') y=input('what is the y location of the object?') You write the program so that the computer plays the game. Pick a starting point. Program Calculates the distance to the object. Program picks another point, calculates the distance to the object. Program knows its at the right spot when the distance is less than 1. The program will consist of mostly loops and if-then statements. ONLY PROMPT THE USER TO INPUT THE "SECRET" X AND Y LOCATION. THE COMPUTER WILL FIND THE POINT. DO NOT KEEP PROMPTING THE USER TO KEEP GUESSING. IT IS THE PROGRAM'S JOB TO FIND THE POINT THE USER HAS CHOSEN. Program is finding a point the user picks in a 20X20 matrix. It also needs to have a counter built in so you know how many steps it takes the program to find the x,y coordinate. Points will be chosen using logic, not random.
In: Computer Science
In: Civil Engineering
In some of the recent corporate scandals, senior executives “doctored the books” and misrepresented the corporate financial status of the company. In others, transactions were created to and from inert or false companies to enhance the bottom line. All of these actions required some intervention and dependence on current or new IT systems. As a result the Federal Government passed the SOX regulations in 2002-2003 and the Dodd-Frank Financial Reform law in 2010.
Do you feel the information technology group could or should identify (expose) these fraudulant practices?
What do you feel the responsibilities of the CIO are relative to internal fraud and illegal activities?
Is the CIO ethically responsible for how the network and computing “utility” within the company is used?
Is it an IT responsibility to build and install systems that cannot be compromised?
Does the information technology have the responsibility to ask “why” a business function is needed when a system is built?
Does the internal or external audit function have any responsibility in guiding the development of new Information Technology systems? Explain.
In: Operations Management
Task Intro: Password JAVA.
Write a method that checks a password. The rules for the password are:
- The password must be at least 10 characters. - The password can only be numbers and letters. - Password must have at least 3 numbers.
Write a test class that tests the checkPassword method.
Hint: You can (really should) use method from built-in String class:
public boolean matches(String regex)
to check that the current string matches a regular expression. For example, if the variable "password" is the string to be checked, so will the expression.
password.matches("(?:\\D*\\d){3,}.*")
return true if the string contains at least 3 numbers. Regular expression "^ [a-zA-Z0-9] * $" can be used to check that the password contains only numbers and letters.
Let your solution consist of 4 methods:
checkPassword(string password) [only test this method] checkPasswordLength(string password) [checkPassword help method] checkPasswordForAlphanumerics(string password) [checkPassword help method] checkPasswordForDigitCount(string password) [checkPassword help method]
In: Computer Science
A real estate major collected information on some recent local home sales. The first 6 lines of the database appear below. The columns correspond to the house identification number, the community name, the ZIP code, the number of acres of the property, the year the house was built, the market value, and the size of the living area (in square feet).
|
House_ID |
Neighborhood |
Mail_ZIP |
Acres |
Yr_Built |
Full_Market_Value |
Size |
|
41340053 |
Greenfield Manor |
12859 |
1.00 |
1967 |
$1,00,400 |
960 |
|
4128001474 |
Fort Amherst |
12801 |
.009 |
1961 |
$1,32,500 |
90 |
|
412800344 |
Dublin |
12309 |
1.65 |
1993 |
$1,40,000 |
1620 |
|
4128001552 |
Granite Springs |
10598 |
0.33 |
1969 |
$67,100 |
900 |
|
412800352 |
Arcady |
10562 |
2.29 |
1955 |
$1,90,000 |
1224 |
|
413400322 |
Ornsbee |
12859 |
9.13 |
1997 |
$1,26,900 |
1056 |
For the real estate data of Exercise 1, do the data appear to have come from a designed survey or experiment? What concerns might you have about drawing conclusions from this data set?
In: Math
Write a Python program that calls a function to sum all the numbers in a list and returns the result to the caller. The main program creates a list (with hard-coded or user input) and passes the list as an argument to the function. You may not use the built-in function, sum.
The program calls a second function to multiply all the numbers in a list passed to it by main and returns the product back to the caller.
List can be created with user input or hard-coded elements.
The program calls a third function that takes the list of words (below) passed to it from main and determines which elements are palindromes without changing the original list.
['racecar', 'Python', 'mom', 'java','level', 'DNA','101101' ]
If true, the function appends the word to a new list and returns it to the caller. The main program prints the list of palindromes returned from the function. The function should not modify the original list passed to it from the main (no side effect).
A palindrome is a word, phrase, number or sequence of words that reads the same backward as forward
In: Computer Science
Describe briefly the principle of the Rational method and the limitation of this method for runoff estimation. A sub-catchment of area 0.1km2 is built on gently sloping land. The average slope of the land is 0.001. The length of the longest natural flow path L is 276.3m. The flow time tf in the drainage system is 3min. Determine the 50yr design discharge for the subdivision using the rational method, given that the average runoff coefficient of the subdivision is C=0.7.
The above sub-catchment is drained by a pipe system which is also used to drain the second sub-catchment. The second sub-catchment is of area 0.2km2, average slope 0.002, L=300m, and tf=3min, C=0.5. If the pipe system is designed for the 50-yr rainfall event, what is the appropriate duration to be used? Explain briefly. Hence determine the 50yr design discharge of the drainage system.
The 50-yr rainfall intensity i can be calculated from
i(mm/hr)=a/(td+b)c, where a=687, b=4.2, c=0.42,
td(min)=duration.
In: Civil Engineering
You work for a firm that has decided to exploit the possibilities that sales abroad can bring and want to become an active exporter. You have 2 potential customers under consideration:
a. The first customer you are considering is a potentially large customer in Malaysia where the business potential could be about 15% of you current firm revenues per year for the next few years. This customer requires standard diesel machines, similar to the ones you are already supplying to your customer base in the USA.
b. The second is a potential customer in China. The future business potential is uncertain, however it could grow in the future or this could be even a one-off sale – it depends on how the first few transactions are handled and the support provided to the customer. This customer requires diesel machines which will be custom built for the customer.
What channel (method of entry into the market) would you use in each of the above cases? Justify your answer. What factors would you consider in making the decision?
In: Operations Management
A building has a 9’ deep basement (foundation) wall that is 160’ long. The wall has no windows. On average, 8’ of the wall is below grade (underground). Assume an outside air temperature of 10°F, an inside temperature of 70°F, and an average ground temperature of 45°F.
a. Determined the rate of heat loss through the wall below grade if it is uninsulated.
b. Determine the rate of heat loss through the wall below grade if it is insulated with an R-value of about 12 hr*°F*ft2/Btu.
A commercial building is built on a slab on grade
foundation that is a 120’ by 48’ rectangular shape.
Assume the outside design temperature is -5°F. Determine the rate
of heat loss through the exterior
edge of a concrete slab.
a. For an uninsulated slab edge perimeter.
b. For a slab edge perimeter insulated with 1” of perimeter insulation (an R-value of about 2.5).
c. For a slab edge perimeter insulated with 2” of perimeter insulation (an R-value of about 5).
In: Advanced Math
We will create a program that will guess a number between 1 and 100 chosen by the user.Your program will be iteratively built in several stages, where each stage focuses on implementing just one type of operation. Each stage will build upon the work from the previous stage. This is known as iterative design, a process that allows us to focus on working on a single, simple task at a time, but the resulting software slowly evolves into something much more complex.
Required Concepts: The final homework requires that you implement the following concepts: 1. Storage operations (store data in program) 2. Output operations (print data to screen) 3. Input operations (get data from user) 4. Selection operations (multiple selection based on player input) 5. Mathematical operations (arithmetic, equality, relational) 6. Repetition operations (loop game logic to model multiple turns) 7. Nested selection operations (validate that user’s selection meets rules requirements) CODE IN JAVA!!
In: Computer Science