Questions
Java Proect Project Outcomes Develop a Java program that: • creates a user designed class •...

Java Proect

Project Outcomes

Develop a Java program that:

creates a user designed class

uses proper design techniques including reading UML Class

Diagrams

reads input from the keyboard using a Scanner Object and its

methods

uses selection (if and if else) statements

uses iteration (while, do while or for) statements

uses String comparison methods.

follows standard acceptable programming practices.

handles integer overflow errors

Prep Readings:

Zybooks chapter 1 - 6

1. General

The game of Stix is a simplified version of an ancient game and somehow

looks like this:

It is played by two players

A number of sticks (like matches) are placed on a table.

The first player takes 1, 2 or 3 sticks away, provided that there that

many on the table.

Then the second player takes 1, 2 or 3 sticks away (if possible), and so

on.

Whoever takes the last stick, loses (!)

Your program does the following:

1.

It asks the initial number or stix (between 5 and 30)

2.

It asks if the computer (program) takes first

3.

It then lets the user and the computer take turns until the number of

stix drops to 0.

4.

Depending on who took the last stix, it declares the winner.

A simple run looks like this (Computer goes first and wins)

How many stix to begin with? [5 - 30] > 12

Computer goes first? [y/n] > y

Stix on the table: ||||||||||||

Computer takes 3

Stix on the table: |||||||||

How many stix to take? [1 - 3] > 2

Stix on the table: |||||||

Computer takes 2

Stix on the table: |||||

How many stix to take? [1 - 3] > 1

Stix on the table: ||||

Computer takes 3

Stix on the table: |

How many stix to take? [1 - 1] > 1

Stix on the table:

I win!

Here is another short run (Player goes first and wins)

How many stix to begin with? [5 - 30] > 14

Computer goes first? [y/n] > n

Stix on the table: ||||||||||||||

How many stix to take? [1 - 3] > 1

Stix on the table: |||||||||||||

Computer takes 1

Stix on the table: ||||||||||||

How many stix to take? [1 - 3] > 3

Stix on the table: |||||||||

Computer takes 1

Stix on the table: ||||||||

How many stix to take? [1 - 3] > 3

Stix on the table: |||||

Computer takes 1

Stix on the table: ||||

How many stix to take? [1 - 3] > 3

Stix on the table: |

Computer takes 1

Stix on the table:

You win!

There are of course two more possible situations: a) Computer goes first,

Player wins and b) Player goes first, Computer wins. Actually, all four can

happen. So be prepared for that!

In: Computer Science

If x=3, y=4 what is the value of this Java expression? (double) (x/y) What is the...

If x=3, y=4 what is the value of this Java expression?

(double) (x/y)

What is the value of this Java expression?

(int)(1.0 / 2.0) + (double)(1 / 2)

True or False:

(double)(x)/y is the same as double (x/y)

What is the value of this Java expression?

(double)3  

In: Computer Science

Catherine decided to see a registered dietitian after watching a news story about the 2006 CDC...

Catherine decided to see a registered dietitian after watching a news story about the 2006 CDC Preconception Health Initiative (p. 66), including the recommendation that each person should make a reproductive life plan. Currently 29 years old, she has been on oral contraceptives for 10 years. She would like to have children someday, possibly in her mid-thirties, after she has established her career. Her height is 5’6” (1.68 m) and her weight is 175 lb. (79 kg). She considers herself fairly active, exercising for about 30 minutes three times per week. Due to being a busy professional, she admits to drinking close to 40 ounces of coffee most days and only occasionally drinks alcohol. Her personal health history includes iron-deficiency anemia at age 25, although she thinks this has resolved; her family history includes heart disease and type two diabetes; both of her parents are still living. No recent lab work is available.

Comment on the following questions and number your responses:

  1. Should she change her method of contraception for nutrition or other health reasons?
  2. Are there any risk factors for impaired fertility in her current health status?
  3. What recommendations do you have to help her meet her long-term goal of having children someday?

In: Psychology

You are working as the software developer and need to identify the best sorting algorithm. You...

You are working as the software developer and need to identify the best sorting algorithm.

You can pick any two-sorting algorithm. You need to determine which sorting algorithm is the best to sort the array of 10k elements.

Use the following steps to help with your solution:

  1. Create C++ functions for any two-sorting algorithm.
  2. Write down the random array generation function to generate at least 10k elements.
  3. Pass the same array into both the sorting algorithm.
  4. Calculate the end transactiontime-start transactiontime for each sorting algorithm.
  5. Determine the best algorithm for sorting 10k elements based on the transaction time.

In: Computer Science

Evaluating Source One of the responsibilities often associated with management is the gathering of career-specific information...

Evaluating Source

One of the responsibilities often associated with management is the gathering of career-specific information on resources or professional development. Familiarity with professional sources shows you have interest in your field and invest time to stay current with developments and debates in your industry. Sources for the IT field.

For this assignment, you will identify credible sources related to your field. You will identify the sources using accurate APA format. Then, for each source, you will write two complete paragraphs that

  1. Summarize the source;
  2. Comment on the source’s benefits and currency.

For your sources, you should include at least one of each of the three following sources:

  1. An academic or professional source from the Keiser e-library database. Avoid single articles, too. Try to identify a database or a journal relevant to your field.
  2. A professional news in your field or a respected commercial site like The New York Times, The Wall Street Journal. An online magazine such as Forbes or Fortune might be appropriate, depending on your field.
  3. An organizational site such as .org, .edu, and .gov site. Examples could include American Medical Association, the National Criminal Justice Association, the American Dairymen's Association, and so forth.

In: Computer Science

MALAY CIVILIZATION, BEFORE AND AFTER INDEPENDENCE IN MALAYSIA

MALAY CIVILIZATION, BEFORE AND AFTER INDEPENDENCE IN MALAYSIA

In: Psychology

What are your feelings about ethical investing and purchasing policies at both a personal and commercial...

  • What are your feelings about ethical investing and purchasing policies at both a personal and commercial level?
  • Do they make a difference?
  • When shopping do you look for products that are made ethically? What are you looking for?
  • Should companies and each of us personally have an "ethical purchasing policy"? Why or why not?

These questions are related to my business plan blog which I am making on the restaurant business. so, please answer all the questions according to that scenario.

In: Operations Management

Java Write a JavaFX application that displays a button and a number. Every time the button...

Java

Write a JavaFX application that displays a button and
a number. Every time the button is pushed, change the number
to a random value between 1 and 100.

Thank you and can you show a picture of the result as well

In: Computer Science

Steve Jobs was a flighty pioneer. His organization conduct wasn't the standard of school reading material...

Steve Jobs was a flighty pioneer. His organization conduct wasn't the standard of school reading material - he wasn't perceiving for his consultative or understanding structure program.

In: Computer Science

Find vectors of the Frenet frame of the curve at any point of the curve: x...

Find vectors of the Frenet frame of the curve at any point of the curve:

x = a(t-sin(t)), y = a(1-cos(t)), z = 4acos(t), where a is a positive constant.

Please show all steps and relevant formulae!

In: Advanced Math

In order to evaluate where a team is, it is important for a leader to evaluate...

In order to evaluate where a team is, it is important for a leader to evaluate and reflect on his or her own goals and performance. Explain how you measure your own performance. How might you better evaluate yourself in terms of reaching your goals? In what ways do you see this impacting the importance of evaluating where a team is at in enhancing the performance of that team?

In: Psychology

Flexible Overhead Budget Leno Manufacturing Company prepared the following factory overhead cost budget for the Press...

Flexible Overhead Budget

Leno Manufacturing Company prepared the following factory overhead cost budget for the Press Department for October of the current year, during which it expected to require 9,000 hours of productive capacity in the department:

Variable overhead cost:
   Indirect factory labor $81,900
   Power and light 3,870
   Indirect materials 25,200
      Total variable overhead cost $110,970
Fixed overhead cost:
   Supervisory salaries $38,840
   Depreciation of plant and equipment 24,410
   Insurance and property taxes 15,540
      Total fixed overhead cost 78,790
Total factory overhead cost $189,760

Assuming that the estimated costs for November are the same as for October, prepare a flexible factory overhead cost budget for the Press Department for November for 7,000, 9,000, and 11,000 hours of production. Round your interim computations to the nearest cent, if required. Enter all amounts as positive numbers.

Leno Manufacturing Company
Factory Overhead Cost Budget-Press Department
For the Month Ended November 30
Direct labor hours 7,000 9,000 11,000
Variable overhead cost:

Flexible Overhead Budget

Leno Manufacturing Company prepared the following factory overhead cost budget for the Press Department for October of the current year, during which it expected to require 9,000 hours of productive capacity in the department:

Variable overhead cost:
   Indirect factory labor $81,900
   Power and light 3,870
   Indirect materials 25,200
      Total variable overhead cost $110,970
Fixed overhead cost:
   Supervisory salaries $38,840
   Depreciation of plant and equipment 24,410
   Insurance and property taxes 15,540
      Total fixed overhead cost 78,790
Total factory overhead cost $189,760

Assuming that the estimated costs for November are the same as for October, prepare a flexible factory overhead cost budget for the Press Department for November for 7,000, 9,000, and 11,000 hours of production. Round your interim computations to the nearest cent, if required. Enter all amounts as positive numbers.

Leno Manufacturing Company
Factory Overhead Cost Budget-Press Department
For the Month Ended November 30
Direct labor hours 7,000 9,000 11,000
Variable overhead cost:

In: Accounting

Jennifer took clothes to the cleaners three times last month.​ First, she brought 3 shirts and...

Jennifer took clothes to the cleaners three times last month.​ First, she brought 3 shirts and 1 pair of slacks and paid ​$9.96. Then she brought 6 ​shirts, 4 pairs of​ slacks, and 2 sports coats and paid ​$40.88. ​Finally, she brought 4 shirts and 2 sports coats and paid ​$20.94. How much was she charged for each​ shirt, each pair of​ slacks, and each sports​ coat? Jennifer was charged ​$ nothing for each​ shirt, ​$ nothing for each pair of​ slacks, and ​$ nothing for each sports coat.

In: Advanced Math

The S&H Mercantile in Luther is the only game in town for a number of items...

The S&H Mercantile in Luther is the only game in town for a number of items and tries valiantly to use only the storage space needed to display items since there is no stock room in the back of the store. One popular item, a 16-ounce can of dehydrated water, takes up 20 square inches of shelf space. The shelf space available for this item measures five feet by four feet. The store manager would like to order a quantity that can fill the shelf space without stacking and without needing to store cans elsewhere in the store. The amount ordered should all be on display once the S&H runs out and ideally would arrive just as the last can is purchased.

A. Suppose the annual demand is 8,000 units and the cost per can is $3 with a holding cost of 10%. What is the required order cost per lot?

B. Drought conditions spike demand during the summer to an annualized rate of 27,000 cans per year and the price rises to $12 per can with a holding cost of 20%. What is the required order cost per lot?

In: Operations Management

In java, implement a program that returns a value of the area of the geometric objects...

In java, implement a program that returns a value of the area of the geometric objects listed below.
Use the technique of method overloading concept and also uses the interfaces for dynamic method
invocation.

Triangle: √?(? − ?)(? − ?)(? − ?)
where s=(a+b+c)/2
a,b,c are the sides of the
triangle.

Square: A^2 where A is the side

Rectangle: (a*b) where a ,b are sides
Circle: ? = ??2 where r is the radius
Cube: 6a^2 where a is the side

In: Computer Science