Questions
Use Java (Science: day of the week) Zeller’s congruence is an algorithm developed by Christian Zeller...

Use Java

(Science: day of the week)

Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the day of the week.
The formula is :

h = (q + 26(m+1)/10 + k + k/4 + j/4 + 5j) % 7

where

- h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday).

- q is the day of the month.

- m is the month (3: March, 4: April, ..., 12: December). January and February are counted as months 13 and 14 of the previous year.

- j is the century (i.e., year/100)

- k is the year of the century (i.e., year%100).

Note that the division in the formula performs an integer division.

Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the week.

Sample Run 1

Enter year: (e.g., 2012): 2015
Enter month: 1-12: 1
Enter the day of the month: 1-31: 25
Day of the week is Sunday

Sample Run 2

Enter year: (e.g., 2012): 2012
Enter month: 1-12: 5
Enter the day of the month: 1-31: 12
Day of the week is Saturday

Sample Run 3

Enter year: (e.g., 2012): 2002
Enter month: 1-12: 3
Enter the day of the month: 1-31: 26
Day of the week is Tuesday

Sample Run 4

Enter year: (e.g., 2012): 2008
Enter month: 1-12: 1
Enter the day of the month: 1-31: 1
Day of the week is Tuesday

Sample Run 5

Enter year: (e.g., 2012): 2000
Enter month: 1-12: 2
Enter the day of the month: 1-31: 12
Day of the week is Saturday

(Hint: January and February are counted as 13 and 14 in the formula, so you need to convert the user input 1 to 13 and 2 to 14 for the month and change the year to the previous year.)

Class Name: Exercise03_21

If you get a logical or runtime error, please refer https://liveexample.pearsoncmg.com/faq.html.

In: Computer Science

The following algorithm is widely used for checking whether a credit or debit card number has...

The following algorithm is widely used for checking whether a credit or debit card number has been entered correctly on a website. It doesn't guarantee that the credit card number belongs to a valid card, but it rules out numbers which are definitely not valid. Here are the steps:

  1. Check that the long number has exactly 16 digits. If not, the long number is not valid.
  2. If the long number has 16 digits, drop the last digit from the long number, as this is the "check digit" that we want to check against.  
  3. Multiply by 2 the value of each digit starting from index 0 and then at each even index. In each case, if the resulting value is greater than 9, subtract 9 from it. Leave the values of the digits at the odd indexes unchanged.
  4. Add all the new values derived from the even indexes to the values at the odd indexes and call this S.
  5. Find the number that you would have to add to S to round it up to the next highest multiple of 10. Call this C. If C equals the check digit, then the long number could be valid.

Example

Here is a worked example using the long number "4916592478445662".

  1. There are exactly 16 digits.
  2. So, create a new string including the first fifteen digits of the long number, i.e. "491659247844566" and note that the dropped digit, 2, is the check digit.
  3. Multiply by 2 the value of each remaining digit starting from index 0 and then each even index. In each case, if the resulting value is greater than 9, subtract 9 from it (which reduces larger values to a single digit). Leave the values of the digits at the odd indexes unchanged.
longNumber index longNumber value at index values at even indexes multiplied by 2 Adjusted to a single digit by subtracting 9
0 4 8 8
1 9 9
2 1 2 2
3 6 6
4 5 10 1
5 9 9
6 2 4 4
7 4 4
8 7 14 5
9 8 8
10 4 8 8
11 4 4
12 5 10 1
13 6 6
14 6 12 3
  1. Find S by adding all the values in the last column:

    S = 8 + 9 + 2 + 6 + 1 + 9 + 4 + 4 + 5 + 8 + 8 + 4 + 1 + 6 + 3 = 78

  2. As S = 78, the next highest multiple of 10 is 80. To get from 78 to 80 you must add 2, so C = 2. As this equals the value of the last digit in the long number, the long number could be valid.

a- Write a public method called isCorrectLength() that takes no arguments and returns the boolean value true if the length of longNumber is 16 and false otherwise.

b - Write a public method firstFifteen() that returns a String consisting of the first fifteen characters in the longNumber.

c) - write a public method calculateCheckNumber() to find S and then use the expression S/10 * 10 + 10 – S to find C. The method should first create a string omitting the last digit of the longNumber and then find S by iterating through this string. (You may choose to do a separate iteration for the odd and even indexes, or you could do both in a single loop.)

In: Computer Science

PA4-1 Preparing a Trial Balance, Closing Journal Entry, and Post-Closing Trial Balance [LO 4-3, LO 4-5]...

PA4-1 Preparing a Trial Balance, Closing Journal Entry, and Post-Closing Trial Balance [LO 4-3, LO 4-5]

Required:

1-a. Prepare an adjusted trial balance at September 30, 2015.

Starbooks Corporation provides an online bookstore for electronic books. The following is a simplified list of accounts and amounts reported in its accounting records. The accounts have normal debit or credit balances. Assume the year ended on September 30, 2015.

PA4-1 Part 2

2.

Prepare the closing entry required at September 30, 2015. (If no entry is required for a transaction/event, select "No Journal Entry Required" in the first account field.)

  
  Accounts Payable $ 600
  Accounts Receivable 300
  Accumulated Depreciation—Equipment 900
  Cash 300
  Common Stock 200
  Depreciation Expense 300
  Equipment 3,200
  Income Tax Expense 300
  Interest Revenue 100
  Notes Payable (long-term) 200
  Notes Payable (short-term) 500
  Prepaid Rent 100
  Rent Expense 400
  Retained Earnings 1,500
  Salaries and Wages Expense 2,200
  Service Revenue 6,200
  Supplies 500
  Supplies Expense 200
  Travel Expense 2,600
  Unearned Revenue 200

In: Accounting

1. compute the least non-negative residue of 4^n (mod 9) for n=1,2,3,4,5.... prove that 6*(4^n)=6 (mod...

1. compute the least non-negative residue of 4^n (mod 9) for n=1,2,3,4,5.... prove that 6*(4^n)=6 (mod 9) for every n>0.

2. find nice tests for divisibility of numbers in base 34 by each of 2,3,5,7,11,and 17.

3. in Z/15Z, find all solutions of : (i) [36]X=[78]. (ii) [42]X=[57] (iii) [25]X=[36]

4. in Z/26Z, find the inverse of [9], [11], [17], and [22]

4. write the set of solutions of x=5 mod24. x=17 (mod 18)

for all equation line, there are triple line.

In: Math

Statement: For a given integer N, print all the squares of positive integers where the square...

Statement:

  • For a given integer N, print all the squares of positive integers where the square is less than or equal to N, in ascending order.

Programming Tasks:

  1. Prompt the user to input the value of N
  2. Output to the screen all squares of positive integers <= N

Tests:

Item Test 1 Test 2 Test 3
Inputs: 50 9 100
Outputs: 1 4 9 16 25 36 49 1 4 9 1 4 9 16 25 36 49 64 81 100

In: Computer Science

PART A.Identify the proper form of the equilibrium-constant expression for the equation N2(g)+O2(g)⇌2NO(g) 1.K=[NO][N2][O2] 2.K=[NO]2[N2][O2] 3.K=[N2][O2][NO]2...

PART A.Identify the proper form of the equilibrium-constant expression for the equation

N2(g)+O2(g)⇌2NO(g)

1.K=[NO][N2][O2]
2.K=[NO]2[N2][O2]
3.K=[N2][O2][NO]2
4.K=2[NO][N2][O2]

PART B. The equilibrium-constant of the reaction

NO2(g)+NO3(g)⇌N2O5(g)

is K=2.1×10−20. What can be said about this reaction?

1.At equilibrium the concentration of products and reactants is about the same.

2.At equilibrium the concentration of products is much greater than the concentration of reactants.

3.At equilibrium the concentration of reactants is much greater than that of products.

4.There are no reactants left over once the reaction reaches equilibrium.

Part C

The acid HOCl (hypochlorous acid) is produced by bubbling chlorine gas through a suspension of solid mercury(II) oxide particles in liquid water according to the equation

2HgO(s)+H2O(l)+2Cl2(g)⇌2HOCl(aq)+HgO⋅HgCl2(s)

What is the equilibrium-constant expression for this reaction?

1.K=[Cl2]2[HOCl]2
2.K=[HOCl]2[HgO⋅HgCl2][Cl2]2[H2O][HgO]2
3.K=[HOCl]2[Cl2]2
4.K=[HOCl]2[Cl2]2[H2O]

In: Chemistry

PLEASE USE CHARTS I PROVIDED! The following transactions and adjusting entries were completed by Legacy Furniture...

PLEASE USE CHARTS I PROVIDED!

The following transactions and adjusting entries were completed by Legacy Furniture Co. during a three-year period. All are related to the use of delivery equipment. The double-declining-balance method of depreciation is used.

Year 1
Jan. 4. Purchased a used delivery truck for $27,200, paying cash.
Nov. 2. Paid garage $630 for miscellaneous repairs to the truck.
Dec. 31. Recorded depreciation on the truck for the year. The estimated useful life of the truck is four years, with a residual value of $5,005 for the truck.
Year 2
Jan. 6. Purchased a new truck for $49,250, paying cash.
Apr. 1. Sold the used truck for $14,670. (Record depreciation to date in Year 2 for the truck.)
June 11. Paid garage $450 for miscellaneous repairs to the truck.
Dec. 31. Record depreciation for the new truck. It has an estimated residual value of $8,950 and an estimated life of five years.
Year 3
July 1. Purchased a new truck for $53,920, paying cash.
Oct. 2. Sold the truck purchased January 6, Year 2, for $17,125. (Record depreciation to date for Year 3 for the truck.)
Dec. 31. Recorded depreciation on the remaining truck. It has an estimated residual value of $12,945 and an estimated useful life of eight years.

Journalize the Year 1 transactions and adjusting entries on Page 1.

PAGE 1

JOURNAL

ACCOUNTING EQUATION

DATE DESCRIPTION POST. REF. DEBIT CREDIT ASSETS LIABILITIES EQUITY

1

2

3

4

5

Adjusting Entries

6

7

Journalize the Year 2 transactions and adjusting entries on Page 2.

PAGE 2

JOURNAL

ACCOUNTING EQUATION

DATE DESCRIPTION POST. REF. DEBIT CREDIT ASSETS LIABILITIES EQUITY

1

2

3

4

5

6

7

8

9

10

11

Adjusting Entries

12

13

Journalize the Year 3 transactions and adjusting entries on Page 3.

PAGE 3

JOURNAL

ACCOUNTING EQUATION

DATE DESCRIPTION POST. REF. DEBIT CREDIT ASSETS LIABILITIES EQUITY

1

2

3

4

5

6

7

8

9

Adjusting Entries

10

11

In: Accounting

Use implicit differentiation to find an equation of the tangent line to the curve

 

part 1)

Use implicit differentiation to find an equation of the tangent line to the curve

sin(x+y)=6x−6y at the point (π,π)

Tangent Line Equation: y=

part 2)

Find an equation of the tangent line to the curve x^(2/3)+y^(2/3)=13 at the point (−8,27)

y=

part 3)

Find an equation of the tangent line to the curve

(x^2/36)+(y^2/81)=1

at the point (−3,(−9/2)√3)

An equation of this tangent line to the ellipse at the given point is y=mx+b where

m= and b=

part 4)

Find an equation of the line tangent to the curve defined by x^2+2xy+y^3=4 at the point (1,1)

y=

In: Math

The Tri-City Office Equipment Corporation sells an imported copier on a franchise basis andperforms preventive maintenance...

The Tri-City Office Equipment Corporation sells an imported copier on a franchise basis andperforms preventive maintenance and repair service on this copier. The data below have beencollected from 45 recent calls on users to perform routine preventive maintenance service; foreach call, X is the number of copiers serviced and Y is the total number of minutes spent bythe service person. Assume that first-order regression model (1.1) is appropriate CH01PR20.txt (a) Estimate the change in the mean service time when the number of copiers serviced increases by one. Use a 90 percent confidence interval. Interpret your confidence interval. (d) The manufacturer has suggested that the mean required time should not increase by more than 14 minutes for each additional copier that is serviced on a service call. Conduct a test to decide whether this standard is being satisfied by Tri-City. Control the risk of a Type I error at 0.05. State the alternatives, decision rule, and conclusion. What is the P-value of the test? (e) Does b subscript 0 give any relevant information here about the ``start-up" time on calls, that is, about the time required before service work is begun on the copiers at a customer location?

20 2
60 4
46 3
41 2
12 1
137 10
68 5
89 5
4 1
32 2
144 9
156 10
93 6
36 3
72 4
100 8
105 7
131 8
127 10
57 4
66 5
101 7
109 7
74 5
134 9
112 7
18 2
73 5
111 7
96 6
123 8
90 5
20 2
28 2
3 1
57 4
86 5
132 9
112 7
27 1
131 9
34 2
27 2
61 4
77 5

In: Statistics and Probability

ASSIGNMENT: Enter the hypothetical data below in SPSS to use for the assignment.  The SPSS commands: 'file',...

ASSIGNMENT:

Enter the hypothetical data below in SPSS to use for the assignment.  The SPSS commands: 'file', 'new', 'data' will create a spreadsheet in which to enter the data below (manually).

Case Control Treatment

1                              5                              6

2                              4                              7

3                              5                              5             

4                              4                              6

5                              5                              5

6                              6                              6

7                              5                              5

8                              4                              6

9                              5                              5

10                           5                              10

In this experiment, all participants rated the credibility of fake news stories on a scale of 1 to 10, with higher numbers indicating greater belief. Subjects made ratings after writing a control essay about doing something successfully, and also after writing an essay about an incident in which they were bullied, rejected or otherwise socially excluded (the treatment condition).

1. In conceptual terms, the hypothesis is that social exclusion increases belief in fake news. State this hypothesis in statistical terms and include the correct notation. [1 point]

2. Explain why the t test for dependent (paired) samples is the appropriate test for the hypothesis in terms of the formula for t. [1 point]

3. Compute the means, standard deviations. [1 point]

4. Compute and interpret the effect size (d) for the differences between means. [2 points]

5. Summarize the results of the t test. Also include the correct notation. Are the results of the test significant, i.e., likely in the population? Why or why not? Should you reject or retain the null hypothesis? [4 points]

6. Summarize the results in terms of the conceptual hypothesis and variables. Explain why you think the results have practical meaning (or not). Refer to both t and d in your answer. [1 point]

In: Statistics and Probability