Show that any number that ends in 9 if squared ends at 1.
In: Computer Science
which architechtural pattern is suitable to appliactio in which data is genrated by one computer and used by anoter
In: Computer Science
The Double.parseDouble() method requires a String argument, but it fails if the String cannot be converted to a floating-point number. Write an application in which you try accepting a double input from a user and catch a NumberFormatException if one is thrown. The catch block forces the number to 0 and displays Value entered cannot be converted to a floating-point number. Following the catch block, display the number.
import java.util.*;
public class TryToParseDouble {
public static void main(String[] args) {
// Write your code
here
}
}
In: Computer Science
various provisions of IFRS/FASB related to Franchise Accounting
In: Accounting
I am struggling with this assignment for my java class.
Objectives: Your program will be graded according to the rubric below. Please review each objective before submitting your work so you don’t lose points.
1.Create a new project and class in Eclipse and add the main method. (5 points)
2. Construct a Scanner to read input from the keyboard. (5 points)
3. Prompt the user with three questions from the Psychology Today quiz, and use the Scanner to read their responses. (15 points)
4. Use conditional statements, logical operators, and String methods to check if each user response is either “yes” or “y” with arbitrary capitalization. (30 points).
5. Use an accumulator to track the number of statements that the user agrees with. (15 points)
6. Use a cascading if-else statement to print the result of the quiz that corresponds to the value stored in the accumulator. (20 points)
7. Use meaningful variable names, consistent indentation, and whitespace (blank lines and spaces) to make your code readable. Add comments where appropriate to explain the overall steps of your program. (10 points)
Sample Output: Below is an example run of the program.
The user input is in bold. Psychology Today Quiz: Are You Stressed Out? -------------------------------------------- Do you agree with the following statements?
1. I am losing my sense of humor. Yes
2. I find it more and more difficult to see people socially. no
3. I feel tired most of the time. y You are possibly stressed out.
Choose any three of the twelve statements from the Psychology Today quiz to include in your program. The final line of output should depend on the number of yes responses. The possible final lines are shown in the following table: Yes responses Final output line 0 You may be more exhausted than stressed out. 1 You may be beginning to stress out. 2 You are possibly stressed out. 3 You are probably stressed out. Note that you can print a blank line by calling System.out.println with no argument.
In: Computer Science
For a summer camp, just kinda make up stuff
describe the organizational structure of the project. Additionally, describe the organizational structure of the company that engaged in that project. Once you have described the two sets of organizational structures, discuss how well (or not so well) they meshed and worked together. describe any changes you would make to the organizational structure of the project based on your readings. Justify your recommendation.
In: Operations Management
Describe the basic elements of human nature and how
they affect information security policy development and impact
information security policy implementation issues.
Propose at least three ways that organizations can
overcome these policy development and implementation
issues.
In: Computer Science
In: Finance
Pick a project with which you are familiar. Briefly describe the project. Once you have provided an overview of the project develop a bottom-up budget for the project. Justify the budget and describe how much confidence you have in the budget. Once you have a budget, develop an estimate of how long each of the major activities of the project will take. Defend your estimates. Finally, describe how long you estimate it will take to complete the project.
In: Operations Management
1) Describe what a VLAN is and how it might be important with wireless networks.
2) Explain why packet filtering alone is inadequate as the only form of firewall.
3) Describe the role of a DMZ when talking about perimeter firewalls.
4) Describe what a “Proxy Server” is and how it is used with firewalls.
5) Explain the role of a “personal “ firewall on a corporate network where there is a robust perimeter firewall.
6) What is the advantage of a hardware firewall over a software-only firewall?
7) List three software firewalls that can be installed on a Windows PC.
8) List three firewall appliances that can be installed in a small business. Include the manufacturer and model number
9) Choose two Packet Filtering best practices from our text that you think are the most important. Explain why they are the most important.
In: Computer Science
Java Collatz Conjecture (Timelimit: 3 seconds)
Problem Description
Write a Java program to solve the following problem.
The Collatz conjecture is about a sequence: start with any positive integer n. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.
| 1,if n = 1
f(n) = | f(3n + 1),if n is odd
| f(n/2),otherwise
Input:
The input is in ‘sequence.txt’. The first line of the input contains the line count m (1 ≤ m ≤ 1,000), which is the number of lines that follows the first line. Each of the following lines contains an integer n (1 ≤ n ≤ 10,000).
Sample input: (with periods at the end)
2.
12.
27.
Output:
The output consists of m lines. Each line prints the number of terms in the sequence of f(n) to a file 'output.txt'.
Sample output:
10.
112.
Information:
1. The expected complexity is unknown.
2. Write a code ‘A.java’ that reads ‘sequence.txt’ and writes the output in a file called ‘output.txt’.
3. The score will be 0 if your program does not terminate within 3 seconds.
In: Computer Science
An avid gardener plants a kiwi vine in the backyard. After many years, in spite of luxuriant growth and many pollinating bees in the backyard, the tree does not bear fruit. All the blooms display lovely white flowers and a large carpel with long sticky stigmas in the center. What is a possible explanation for the problem?
In: Biology
what you feel like are the two most important policy proposals/directions that should be implemented/explored in the US health care system to combat the challenges of an aging population and a distressed Medicare program. This includes Medicare reform, end of life care, technology adoption, medical ethics, etc. What I want you to do here is essentially a mini- EPA which is good practice for your term paper. For each policy describe the economic impact (intended and unintended), any political concerns, and justify why the policy is one of the most important in your mind. This should be roughly three paragraphs in length.
In: Operations Management
Discussion 06.2: Fresh Water: A Limited Resource
Read “Growing Demands for a Limited Supply of Water in the West” on page 354. Describe the problem, the cause, and some possible solutions. SC1100 - Environmental Science
In: Psychology
I have attempted to implement some changes to my source code and was unable to succefully implement there are (two) changes. I am in the learning process so comments help in the learning curve so if possible leave comments.
PLEASE DONT CHANGE ANY OF THE SOURCE CODE - unless needed to implement the changes.
* Change the program so that the user can choose to either check if a password is valid or have the program randomly generate a password that is valid.
* Add the functionality to generate a valid password, display this password and end the program.
SOURCE CODE PROVIDED BELOW
import java.util.Scanner;
public class PasswordChecker {
public static void main(String[] args) {
Scanner keyboard = new
Scanner(System.in);
String password;
int uppers = 0;
int lowers = 0;
int numbers = 0;
int special = 0;
int length = 0;
System.out.println("Enter your
password: ");
System.out.println("Rules:
");
System.out.println("* 9 to 30
characters in length");
System.out.println("* contain at
least one uppercase letter (A - Z)");
System.out.println("* contain at
least one lowercase letter (a - z)");
System.out.println("* contain at
least one number digit (0 - 9)");
System.out.println("* contain at
least one special character (# @ $ % + = )");
password =
keyboard.nextLine();
length = password.length();
if ((length < 9) || (length >
30)) {
System.out.println("Please re-enter password, keep in mind more
than 9 char and less than 30");
}
else
{
for(int i = 0; i
< length; i++) {
if(Character.isUpperCase(password.charAt(i)))
uppers++;
else if
(Character.isLowerCase(password.charAt(i)))
lowers++;
else if
(Character.isDigit(password.charAt(i)))
numbers++;
else if
(specialCompare(password.charAt(i)))
special++;
}
}
if((uppers == 0) || (lowers == 0)
|| (numbers == 0) || (special == 0))
System.out.println("Password is missing one of the
requirements");
else
System.out.println("Good password");
}//End main
static boolean specialCompare(char a) {
switch(a) {
case '@':
case '#':
case '$':
case '%':
case '+':
case '=':
return
true;
}
return false;
}//End specialCompare
}//End class
In: Computer Science