In: Operations Management
Submission Question 3: Polymorphism
Problem
You are writing software for a company’s human resources department. As part of the requirements, it would like to have a function that calculates the salary of an individual based on the position he or she holds, years of service, and hours worked.
This program will demonstrate the following:
Solving the Problem
Step 1
The first thing that you must determine is what attributes are common to all employees and what methods they can share. Can salary be easily calculated by the same method without some additional input from the user? By using polymorphism, you can make one method that calculates salaries for different groups. First, determine the base class and what method needs to be implemented by the child classes. By making the calcSalary() method abstract, it will be a required method of the child classes.
Step 2
You can then define the child classes that inherit the shared attributes from the base Employee class but also inherit the requirement that they implement from the calcSalary() method. Each employee type will have a different set of attributes and a different method of calculating the salary, but the same method call will be used to calculate it.
Step 3
You can now create a list to hold all employee types and populate it.
Step 4
Because you used polymorphism in the classes, you can now use one loop to calculate and output the salaries of the employees.
Documentation Guidelines:
Use Python Programming. Use good programming style (e.g., indentation for readability) and document each of your program parts with the following items (the items shown between the '<' and '>' angle brackets are only placeholders. You should replace the placeholders and the comments between them with your specific information). Your cover sheet should have some of the same information, but what follows should be at the top of each program's sheet of source code. Some lines of code should have an explanation of what is to be accomplished, this will allow someone supporting your code years later to comprehend your purpose. Be brief and to the point. Start your design by writing comment lines of pseudocode. Once that is complete, begin adding executable lines. Finally run and test your program.
Deliverable(s):
Your deliverable should be a Word document with screenshots showing the source code and running results, and discuss the issues that you had for this project related to AWS and/or Python IDE and how you solved them for all of the programs listed above as well as the inputs and outputs from running them. Submit a cover sheet with the hardcopy of your work.
In: Computer Science
Write a Java program to play the game Tic-Tac-Toe. Start off with a human playing a human, so each player makes their own moves.
Follow the design below, creating the methods indicated and invoking them in the main program.
Use a char array of size 9 as the board; initialize with the characters 0 to 8 so that it starts out looking something like the board on the left.
|
0|1|2 3|4|5 6|7|8 |
and then as moves are entered the board looks like this |
0|O|2 3|X|5 6|X|O |
Make sure the board lines up properly so that the entries and borders all line up properly. DO NOT print a board that looks like or is similar to the output below where columns are misaligned.
0| O|2
3|X | 5
6 | X|O
You will need a variable to keep track of whose turn it is. Use a char variable named turn and initialize to X when the game starts. After a move, if there is no winner and no draw, switch to the O and continue to take turns as the game progresses. Declare additional variables as you build your program.
SAMPLE OUTPUT – NOTE OUTPUT BOLDED TO SHOW HANDLING OF BAD ENTRIES
|
Enter S to stop game, any other letter to play x Starting new game 0|1|2 3|4|5 6|7|8 Enter move, a number between 0 and 8 5 0|1|2 3|4|X 6|7|8 Enter move, a number between 0 and 8 5 Spot is taken, choose another Enter move, a number between 0 and 8 0 O|1|2 3|4|X 6|7|8 Enter move, a number between 0 and 8 4 O|1|2 3|X|X 6|7|8 Enter move, a number between 0 and 8 2 O|1|O 3|X|X 6|7|8 Enter move, a number between 0 and 8 3 O|1|O X|X|X 6|7|8 X is the winner Enter S to stop game, any other letter to play x Starting new game 0|1|2 3|4|5 6|7|8 |
Enter move, a number between 0 and 8 0 X|1|2 3|4|5 6|7|8 Enter move, a number between 0 and 8 3 X|1|2 O|4|5 6|7|8 Enter move, a number between 0 and 8 9 9 is not a valid choice Enter move, a number between 0 and 8 z z is not a valid choice Enter move, a number between 0 and 8 6 X|1|2 O|4|5 X|7|8 Enter move, a number between 0 and 8 1 X|O|2 O|4|5 X|7|8 Enter move, a number between 0 and 8 5 X|O|2 O|4|X X|7|8 Enter move, a number between 0 and 8 8 X|O|2 O|4|X X|7|O Enter move, a number between 0 and 8 4 X|O|2 O|X|X X|7|O Enter move, a number between 0 and 8 2 X|O|O O|X|X X|7|O Enter move, a number between 0 and 8 7 X|O|O O|X|X X|X|O Game is a draw Enter S to stop game, any other letter to play |
In: Computer Science
Assignment Details
The human resource employee benefits and compensation programs are built upon the in-depth evaluation of each position and the determination of its value within the construct of the organization. Job analysis is a critical component in this process. Another major part is market pricing, which assumes that the pay set by the employers is an accurate reflection of a job’s worth. Both parts are important to ensuring that equity in pay and compensation exists. In the event that equity and fairness are not always met for compensation and benefits, this could lead to employee dissatisfaction and retention problems. It is therefore incumbent upon the organization to correct any inequities.
This discussion has three parts, as follows:
In: Operations Management
In: Operations Management
In: Operations Management
Explain the following:
Discuss the eyes of other animals—let’s say cats, flies, and hummingbirds. What do these animals’ eyes do better than humans’? Why does the animal benefit from these different abilities? Does the animal lack visual abilities that humans have?
In: Physics
Biology/ anatomy of the human body
Briefly discuss three structural and two functional characteristics common to the stomach, urinary bladder, and vagina.
Why is litmus, which detects changes in pH, an appropriate reagent to use when monitoring the effects of enzymes on lipid digestion?
A drop of Patient X’s blood is mixed separately with Anti-A serum; Anti-B serum; and Anti-Rh serum. No agglutination (clumping) was observed. What is Patient X’s blood type?
One ml. of amylase, and one ml. of the starch solution are added to a test tube and incubated in a boiling water bath for five minutes. Five drops of iodine solution are then added to the test tube producing a dark blue / black color. Explain.
In: Biology
What is the basic reaction by which biological monomers form polymers?
A. hydrolysis
B. dehydration
C. mechanical displacement
If the environment surrounding a cell has a lower concentration of dissolved substances than the cell, the
A. environment is isotonic to the cell
B. environment is hypertonic to the cell
C. cell will not experience a net gain or loss of water
D. environment is hypotonic to the cell.
E. cell will die
Cell theory states that
A. life is spontaneously generated
B. New cells come only from pre-existing cells
C. cells can form from non-organic material
In a neutral atom, protons are always
A. equal to the electrons
B. equal to the neutrons
C. more than the electrons
D. less than the electrons
Water is best described as which of the following?
A. an ion
B. a non-polar molecule
C. an atom
D. a polar molecule
What allows a cell to maintain it shape?
A. the cell takes up water to remain round
B. the Golgi apparatus
C. the cytoskeleton
How do eukaryotic cells form tissues?
A. they are each either positively or negatively charged and are attracted to each other
B. their cell membranes fuse
C. they connect via the extracellular matrix
The main reason that cellular respiration needs to occur step by step instead of a single, big reaction is
A. cells don't store enough oxygen
B. cells don't have many mitochondria.
C. too much energy would be released for the cell to harness
D. cells produce the enzymes needed for cellular respiration very slowly
Isotopes of the same element are different from one another in that they have a different number of
A. neutron
B. electrons
C. protons
The energy to power the Calvin cycle comes from
A. cellular respiration
B. the light reactions of photosynthesis
C. oxygen
Which of the following can be broken down into intermediate products that enter cellular respiration?
A. Proteins
B. Lipids
C. Carbohydrates
D. All of these.
Name three organelles that are unique to plant cells.
A. mitochondria, nucleus, ribosomes
B. Golgi apparatus, mitochondria, endoplasmic reticulum
C. cell wall, central vacuole, chloroplast
If a cell has a greater concentration of dissolved substances than its surrounding environment, the cell
A. is hypertonic to the environment
B. is isotonic to the environment
C. is hypotonic to the environment
D. will not experience a net gain or loss of water
E. will die
In animal cells the primary organelle that generates molecules of ATP is the
A. ribosome
B. lysosome
C. Golgi body
D. mitochondrion
The structure that easily distinguishes a plant cell from an animal cell is
A. chloroplasts
B. nucleus
C. plasma membrane
D. mitochondria
When a plant becomes dried out
A. stomata (leaf pores) close, decreasing gas exchange
B. stomata open, decreasing gas exchange
C. stomata close, increasing gas exchange
D. stomata open, increasing gas exchange
Which is the main component of cell membranes?
A. Cholesterol
B. Sucrose
C. proteins
D. Phospholipids
The molecule that absorbs sunlight for photosynthesis is
A. oxygen
B. carbon dioxide
C. glucose
D. chlorophyll
E. sunlight
A cell produces 36 ATPs per glucose, however, if you calculated the total energy in a glucose molecule, 90 ATPs should be generated. Why is this so?
A. Some of the energy is destroyed
B. Some of the energy is used to do work in the cell
C. Some energy is lost as heat
Organic molecules are best defined as chemical compounds that contain
A. carbon
B. carbon and oxygen
C. carbon and hydrogen
The first stage of cellular respiration, called ___________, takes place in the cytoplasm of the cell and needs no oxygen.
A. glycolysis
B. citric acid cycle
C. photorespiration
D. oxidation
The products of cellular respiration are
A. carbon dioxide, glucose, and water
B. glucose, water, and ATP
C. glucose, carbon dioxide, and ATP
D. oxygen, ATP, and water
E. carbon dioxide, water, and ATP
The second energy shell of an atom contains a maximum of ________ electron(s).
A. one
B. two
C. four
D. eight
Making and breaking molecules in the body require the aid of ____________ to help the reactions begin
A. heat
B. oil
C. enzymes
D. blood
The term "functional" is used in the phrase "functional group" because it describes a group of atoms
A. that react a certain way with other molecules
B. that make the entire molecule hydrophobic
C. that are organic
What is an enzyme?
A. a protein that facilitates a reaction
B. a protein that supplies water for hydrolysis reactions
C. a protein that absorbs water during dehydration reactions
The organelle that carries out photosynthesis in plants is the
A. chloroplast
B. mitochondria
C. ribosome
D. chlorophylllysosome
What kind is it when one atom takes an electron from another atom?
A. ionic
B. covalent
C. hydrogen
How do we dispose of the carbon derived from the glucose that is metabolized during respiration?
A. via our urine
B. by breathing out
C. it is broken down in lysosomes
What kind of reaction is photosynthesis?
A. exergonic
B. kinetic energy
C. endergonic
D. potential energy
E. equilibrium
The enzyme that forms a transmembrane channel in mitochondria and phosphorylates ADP
A. a carrier protein
B. acetyl CoA
C. ATP synthase
Diffusion
A. requires energy
B. utilizes proteins to move molecules across a membrane
C. moves molecules against a concentration gradient
D. cannot occur without a membrane present
E. does not require energy
The Calvin cycle
A. produces three-carbon chains from CO2
B. produces ATP
C. degrades carbon chains
What is energy?
A. the capacity to do work
B. what holds an atom's nucleus together
C. the decay of neutrons
Eukaryotes such as animal and plants cells differ from prokaryotes in that prokaryotes
A. lack protein
B. lack DNA
C. lack a nucleus
What is G3P? What is it used for?
A. it is the first product of photosynthesis; used to make all polymers
B. it is formed following use of ATP, and functions as a carrier
C. it closes leaf pores and prevents the leaf from drying out
The prokaryotic structure that would protect a cell from drying out
A. cell wall
B. nucleus
C. plasma membrane
Although water has no overall charge, how and why does it form hydrogen bonds?
A. it is slippery
B. it is polar
C. it is liquid
How do the cells in one individual recognize each other as “self” and the cells of a transplanted organ as “not self”?
A. the cells of each individual have unique transmembrane recognition proteins
B. each individual has unique DNA
C. each individual has a unique cell wall
Entropy is
A. order
B. complexity
C. disorder
D. Both order and disorder are correct
E. Both complexity and disorder are correct
Glycolysis takes place in the _____________ and the citric acid cycle and electron transport chain take place in the ___________.
A. cytoplasm; endoplasmic reticulum
B. mitochondria, chloroplast
C. cytoplasm; mitochondria
D. mitochondria; cytoplasm
If an atom has an outer shell that is full it is
A. highly reactive
B. highly likely to combine with other atoms
C. highly unlikely to combine with other atoms
Reactions that tend to go on their own, releasing energy, are called:
A. endergonic
B. exergonic
C. catalytic
D. productive
How does chlorophyll function in photosynthesis?
A. by absorbing the sun's energy
B. by absorbing carbon dioxide
C. by absorbing water
The energy source for the process of photosynthesis is
A. oxygen
B. sunlight
C. carbon dioxide
D. chlorophyll
E. glucose
The energy required to start a chemical reaction is called:
A. exergonic energy
B. endergonic energy
C. kinetic energy
D. activation energy
E. catalytic energy
During adsorption of sunlight by photosystems, H+ ions are generated. Where do they come from? What are they used for?
A. water; they help form sugar
B. from the breakdown of sugar; they help form water
C. from carbon dioxide; they help dissolve NaCl
Why is consuming on a sugar-free diet, without reducing overall caloric intake, not necessarily effective?
A. all food groups feed into the respiration pathway
B. our body builds sugar from excess protein and fat
C. extra sugar is stored in our blood stream
Which polymer serves as the information storage molecule for cells?
A. Carbohydrate
B. Nucleic acid
C. Protein
D. Lipids
ATP contains
A. three phosphate groups
B. two phosphate groups
C. three nitrate groups
D. phenylalanine
In: Biology
This sequence represents the non-template strand of the entire transcribed region (i.e., the first G is +1) of the ILTCD gene (which is the “I Love The Central Dogma” gene):
5’GAGATTCGATGGTAAGTCTCATTGCGTCCTGAGTCCTAATTTAAATAAAGCCTTTGTAATACAGGGCAATAAAGGCCTACGC 3’
In: Biology