Question 8 2
Solution
The term is economies of scale
Economies of scale refer to the cost advantages that a firm can enjoy when the volume of
production increases, in the long run. Economies of scale mean that costs per unit of output
decrease when output is expanded while output proportions are kept constant..
project 6/cards.py
import random
class Card( object ):
""" Model a playing card. """
# Rank is an integer (1-13), where aces are 1 and kings are 13.
# Suit is an integer (1-4), where clubs are 1 and spades are 4.
# Value is an integer (1-10), where aces are 1 and face cards are 10.
# List to map integer rank to printable character (index 0 used for no rank)
rank_list = ['x','A','2','3','4','5','6','7','8','9','10','J','Q','K']
# List to map integer suit to printable character (index 0 used for no suit)
# The commented-out list prints symbols rather than characters. You may use either.
suit_list = ['x','c','d','h','s']
#suit_list = ['x',u'\u2660',u'\u2665',u'\u2666',u'\u2663']
def __init__( self, rank=0, suit=0 ):
""" Initialize card to specified rank (1-13) and suit (1-4). """
self.__rank = 0
self.__suit = 0
# Verify that rank and suit are integers and that they are within
# range (1-13 and 1-4), then update instance variables if valid.
if type(rank) == int and type(suit) == int:
if rank in range(1,14) and suit in range(1,5):
self.__rank = rank
self.__suit = suit
def rank( self ):
""" Return card's rank (1-13). """
return self.__rank
def value( self ):
""" Return card's value (1 for aces, 2-9, 10 for face cards). """
# Use ternary expression to determine value.
return self.__rank if self.__rank < 10 else 10
def suit( self ):
""" Return card's suit (1-4). """
return self.__suit
def __eq__( self, other ):
""" Return True if ranks are equal. """
return self.__rank == other.__rank
def __ne__( self, other ):
""" Return True if ranks are not equal. """
return self.__rank != other.__rank
def __le__( self, other ):
""" Return True if rank of self <= rank of other. """
return self.rank() <= other.rank()
def __lt__( self, other ):
""" Return True if rank of self < rank of other. """
return self.rank() < other.rank()
def __ge__( self, other ):
""" Return True if rank of self >= rank of other. """
return self.rank() >= other.rank()
def __gt__( self, other ):
""" Return True if rank of self > rank of other. """
return self.rank() > other.rank()
def __str__( self ):
""" Convert card into a string (usually for printing). """
# Use rank to index into rank_list; use suit to index into suit_list.
return "{}{}".format( (self.rank_list)[self.__rank], (self.suit_list)[self.__suit] )
def __repr__( self ):
""" Convert card into a string for use in the shell. """
return self.__str__()
class Deck( object ):
""" Model a deck of 52 playing cards. """
# Implement the deck as a list.
FaceUp card game In this assignment we will implement a made.pdfabifancystore
FaceUp card game
In this assignment we will implement a made-up card game we'll call FaceUp. When the game
starts, you deal five cards face down. Your goal is to achieve as high a score as possible. Your
score only includes cards that are face up. Red cards (hearts and diamonds) award positive
points, while black cards (clubs and spades) award negative points. Cards 2-10 have points worth
their face value. Cards Jack, Queen, and King have value 10, and Ace is 11.
The game is played by flipping over cards, either from face-down to face-up or from face-up to
face-down. As you play, you are told your total score (ie, total of the face-up cards) and the total
score of the cards that are face down. The challenge is that you only get up to a fixed number of
flips and then the game is over.
Here is an example of the output from playing the game:
At each point where the program asks the user to pick a card, the game waits for user input.
Code
Well implement the game using five classes, three of which you'll leave unchanged, and two you
will modify and submit:
Card: Leave this code unchanged.
CardDealer: Leave this code unchanged.
FaceUpCard: This class extends the Card class with additional functionality. You will add two
methods needed for the FaceUp game.
FaceUpHand: This class keeps track of the state of the game. Most of the methods you will
implement are here.
FaceUpGame: This class implements the game interface. It gets data from the user, updates the
board, and repeats the process. Leave this code unchanged.
How to proceed
You may fill in the details of the FaceUpCard and FaceUpHandclasses however youd like, but
heres what we recommend.
Add the two methods to the FaceUpCard class (described in comments in the code). Add a main
method to this class and test them to make sure they work.
Read through the other two new classes FaceUpHand and FaceUpGame. Make sure you
understand what all of the methods in FaceUpHand are supposed to do and that you understand
how theyre used in the FaceUpGame class.
Implement methods in the FaceUpHand class incrementally. Write one method and then test it!
To test it, again, add a main method and write a small test or two to make sure it behaves like
youd expect. If you try to implement all of the methods and then test it by simply running
FaceUpGame, 1) its very unlikely youll get it perfect the first time and then 2) its going to be very
hard to figure out where the problem is.
Card.java
public class Card {
// min/max for the card number range
private static final int MIN_NUMBER = 1;
private static final int MAX_NUMBER = 13;
private int number;
private String suit;
/**
* Create a new card with number and suit. If the a valid
* suit/number is not input, the card defaults to 1 of hearts.
*
* @param number the card number
* @param suit the card suit
*/
public Card(int number, String suit){
this.number = number;
this.suit = suit.toLowerCase();
if (!isValidSuit(suit)) {
System.out.println(suit + "Is not a valid suit!").
Introduction You implemented a Deck class in Activity 2. This cla.pdffeelinggifts
Introduction:
You implemented a Deck class in Activity 2. This class should be complete except for the
shuffle
method. You also implemented a DeckTester class that you used to test your incomplete Deck
class.
In Activity 3, you implemented methods in the Shuffler class, which shuffled integers.
Now you will use what you learned about shuffling in Activity 3 to implement the Deck shuffle
method.
Exercises:
1. The file Deck.java, found in the Activity4 Starter Code folder, is a correct solution from
Activity 2. Complete the Deck class by implementing the shuffle method. Use the efficient
selection shuffle algorithm from Activity 3.
Note that the Deck constructor creates the deck and then calls the shuffle method. The
shuffle method also needs to reset the value of size to indicate that all of the cards can be
dealt again.
2. The DeckTester.java file, found in the Activity4 Starter Code folder, provides a basic set
of Deck tests. It is similar to the DeckTester class you might have written in Activity 2.
Add additional code at the bottom of the main method to create a standard deck of 52 cards and
test the shuffle method. You can use the Deck toString method to “see” the cards after
every shuffle.
---------------------------------------------
publicclassShuffler {
privatestaticfinalintSHUFFLE_COUNT = 4;
privatestaticfinalintVALUE_COUNT = 4;
/**
* Tests shuffling methods.
* @param args is not used.
*/
publicstaticvoidmain(String[] args) {
System.out.println(\"Results of \" + SHUFFLE_COUNT + \" consecutive perfect shuffles:\");
int[] values1 = newint[VALUE_COUNT];
for (inti = 0; i < values1.length; i++) {
values1[i] = i;
}
for (intj = 1; j <= SHUFFLE_COUNT; j++) {
values1 = perfectShuffle(values1);
System.out.print(\" \" + j + \":\");
for (intk = 0; k < values1.length; k++) {
System.out.print(\" \" + values1[k]);
}
System.out.println();
}
System.out.println();
System.out.println(\"Results of \" + SHUFFLE_COUNT + \" consecutive efficient selection
shuffles:\");
int[] values2 = newint[VALUE_COUNT];
for (inti = 0; i < values2.length; i++) {
values2[i] = i;
}
for (intj = 1; j <= SHUFFLE_COUNT; j++) {
values2 = selectionShuffle(values2);
System.out.print(\" \" + j + \":\");
for (intk = 0; k < values2.length; k++) {
System.out.print(\" \" + values2[k]);
}
System.out.println();
}
System.out.println();
}
publicstaticint[] perfectShuffle(int[] values) {
int[] tVal = newint[values.length];
intc = 0;
for (inti = 0; i < (values.length + 1) / 2; i++) {
tVal[c] = values[i];
c += 2;
}
c = 1;
for (inti = (values.length + 1) / 2; i < values.length; i++) {
tVal[c] = values[i];
c += 2;
}
return tVal;
}
publicstaticint[] selectionShuffle(int[] values) {
for (inti = values.length - 1; i > 0; i--) {
intt = (int) Math.round(Math.random() * i);
inttmp = values[i];
values[i] = values[t];
values[t] = tmp;
}
return values;
}
}
------------------------------------------
publicclassDeckTester {
publicstaticvoidmain(String[] args) {
String[] ranks = { \"jack\", \"queen\", \"ki.
Introduction Now that the Card and Deck classes are completed, th.pdfcharanjit1717
Introduction:
Now that the Card and Deck classes are completed, the next class to design is ElevensBoard.
This class will contain the state (instance variables) and behavior (methods) necessary to play
the game of Elevens.
Here's the code:
import java.util.List;
import java.util.ArrayList;
/**
* The ElevensBoard class represents the board in a game of Elevens.
*/
public class ElevensBoard {
/**
* The size (number of cards) on the board.
*/
private static final int BOARD_SIZE = 9;
/**
* The ranks of the cards for this game to be sent to the deck.
*/
private static final String[] RANKS =
{"ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"};
/**
* The suits of the cards for this game to be sent to the deck.
*/
private static final String[] SUITS =
{"spades", "hearts", "diamonds", "clubs"};
/**
* The values of the cards for this game to be sent to the deck.
*/
private static final int[] POINT_VALUES =
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0};
/**
* The cards on this board.
*/
private Card[] cards;
/**
* The deck of cards being used to play the current game.
*/
private Deck deck;
/**
* Flag used to control debugging print statements.
*/
private static final boolean I_AM_DEBUGGING = false;
/**
* Creates a new ElevensBoard instance.
*/
public ElevensBoard() {
cards = new Card[BOARD_SIZE];
deck = new Deck(RANKS, SUITS, POINT_VALUES);
if (I_AM_DEBUGGING) {
System.out.println(deck);
System.out.println("----------");
}
dealMyCards();
}
/**
* Start a new game by shuffling the deck and
* dealing some cards to this board.
*/
public void newGame() {
deck.shuffle();
dealMyCards();
}
/**
* Accesses the size of the board.
* Note that this is not the number of cards it contains,
* which will be smaller near the end of a winning game.
* @return the size of the board
*/
public int size() {
return cards.length;
}
/**
* Determines if the board is empty (has no cards).
* @return true if this board is empty; false otherwise.
*/
public boolean isEmpty() {
for (int k = 0; k < cards.length; k++) {
if (cards[k] != null) {
return false;
}
}
return true;
}
/**
* Deal a card to the kth position in this board.
* If the deck is empty, the kth card is set to null.
* @param k the index of the card to be dealt.
*/
public void deal(int k) {
cards[k] = deck.deal();
}
/**
* Accesses the deck's size.
* @return the number of undealt cards left in the deck.
*/
public int deckSize() {
return deck.size();
}
/**
* Accesses a card on the board.
* @return the card at position k on the board.
* @param k is the board position of the card to return.
*/
public Card cardAt(int k) {
return cards[k];
}
/**
* Replaces selected cards on the board by dealing new cards.
* @param selectedCards is a list of the indices of the
* cards to be replaced.
*/
public void replaceSelectedCards(List selectedCards) {
for (Integer k : selectedCards) {
deal(k.intValue());
}
}
/**
* Gets the indexes of the actual (non-null) cards on the board.
*
* @return a List that contains the locations .
Here is the game description- Here is the sample game- Here is the req.pdftrishulinoverseas1
Here is the game description:
Here is the sample game:
Here is the requirement:
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
.
project 6/cards.py
import random
class Card( object ):
""" Model a playing card. """
# Rank is an integer (1-13), where aces are 1 and kings are 13.
# Suit is an integer (1-4), where clubs are 1 and spades are 4.
# Value is an integer (1-10), where aces are 1 and face cards are 10.
# List to map integer rank to printable character (index 0 used for no rank)
rank_list = ['x','A','2','3','4','5','6','7','8','9','10','J','Q','K']
# List to map integer suit to printable character (index 0 used for no suit)
# The commented-out list prints symbols rather than characters. You may use either.
suit_list = ['x','c','d','h','s']
#suit_list = ['x',u'\u2660',u'\u2665',u'\u2666',u'\u2663']
def __init__( self, rank=0, suit=0 ):
""" Initialize card to specified rank (1-13) and suit (1-4). """
self.__rank = 0
self.__suit = 0
# Verify that rank and suit are integers and that they are within
# range (1-13 and 1-4), then update instance variables if valid.
if type(rank) == int and type(suit) == int:
if rank in range(1,14) and suit in range(1,5):
self.__rank = rank
self.__suit = suit
def rank( self ):
""" Return card's rank (1-13). """
return self.__rank
def value( self ):
""" Return card's value (1 for aces, 2-9, 10 for face cards). """
# Use ternary expression to determine value.
return self.__rank if self.__rank < 10 else 10
def suit( self ):
""" Return card's suit (1-4). """
return self.__suit
def __eq__( self, other ):
""" Return True if ranks are equal. """
return self.__rank == other.__rank
def __ne__( self, other ):
""" Return True if ranks are not equal. """
return self.__rank != other.__rank
def __le__( self, other ):
""" Return True if rank of self <= rank of other. """
return self.rank() <= other.rank()
def __lt__( self, other ):
""" Return True if rank of self < rank of other. """
return self.rank() < other.rank()
def __ge__( self, other ):
""" Return True if rank of self >= rank of other. """
return self.rank() >= other.rank()
def __gt__( self, other ):
""" Return True if rank of self > rank of other. """
return self.rank() > other.rank()
def __str__( self ):
""" Convert card into a string (usually for printing). """
# Use rank to index into rank_list; use suit to index into suit_list.
return "{}{}".format( (self.rank_list)[self.__rank], (self.suit_list)[self.__suit] )
def __repr__( self ):
""" Convert card into a string for use in the shell. """
return self.__str__()
class Deck( object ):
""" Model a deck of 52 playing cards. """
# Implement the deck as a list.
FaceUp card game In this assignment we will implement a made.pdfabifancystore
FaceUp card game
In this assignment we will implement a made-up card game we'll call FaceUp. When the game
starts, you deal five cards face down. Your goal is to achieve as high a score as possible. Your
score only includes cards that are face up. Red cards (hearts and diamonds) award positive
points, while black cards (clubs and spades) award negative points. Cards 2-10 have points worth
their face value. Cards Jack, Queen, and King have value 10, and Ace is 11.
The game is played by flipping over cards, either from face-down to face-up or from face-up to
face-down. As you play, you are told your total score (ie, total of the face-up cards) and the total
score of the cards that are face down. The challenge is that you only get up to a fixed number of
flips and then the game is over.
Here is an example of the output from playing the game:
At each point where the program asks the user to pick a card, the game waits for user input.
Code
Well implement the game using five classes, three of which you'll leave unchanged, and two you
will modify and submit:
Card: Leave this code unchanged.
CardDealer: Leave this code unchanged.
FaceUpCard: This class extends the Card class with additional functionality. You will add two
methods needed for the FaceUp game.
FaceUpHand: This class keeps track of the state of the game. Most of the methods you will
implement are here.
FaceUpGame: This class implements the game interface. It gets data from the user, updates the
board, and repeats the process. Leave this code unchanged.
How to proceed
You may fill in the details of the FaceUpCard and FaceUpHandclasses however youd like, but
heres what we recommend.
Add the two methods to the FaceUpCard class (described in comments in the code). Add a main
method to this class and test them to make sure they work.
Read through the other two new classes FaceUpHand and FaceUpGame. Make sure you
understand what all of the methods in FaceUpHand are supposed to do and that you understand
how theyre used in the FaceUpGame class.
Implement methods in the FaceUpHand class incrementally. Write one method and then test it!
To test it, again, add a main method and write a small test or two to make sure it behaves like
youd expect. If you try to implement all of the methods and then test it by simply running
FaceUpGame, 1) its very unlikely youll get it perfect the first time and then 2) its going to be very
hard to figure out where the problem is.
Card.java
public class Card {
// min/max for the card number range
private static final int MIN_NUMBER = 1;
private static final int MAX_NUMBER = 13;
private int number;
private String suit;
/**
* Create a new card with number and suit. If the a valid
* suit/number is not input, the card defaults to 1 of hearts.
*
* @param number the card number
* @param suit the card suit
*/
public Card(int number, String suit){
this.number = number;
this.suit = suit.toLowerCase();
if (!isValidSuit(suit)) {
System.out.println(suit + "Is not a valid suit!").
Introduction You implemented a Deck class in Activity 2. This cla.pdffeelinggifts
Introduction:
You implemented a Deck class in Activity 2. This class should be complete except for the
shuffle
method. You also implemented a DeckTester class that you used to test your incomplete Deck
class.
In Activity 3, you implemented methods in the Shuffler class, which shuffled integers.
Now you will use what you learned about shuffling in Activity 3 to implement the Deck shuffle
method.
Exercises:
1. The file Deck.java, found in the Activity4 Starter Code folder, is a correct solution from
Activity 2. Complete the Deck class by implementing the shuffle method. Use the efficient
selection shuffle algorithm from Activity 3.
Note that the Deck constructor creates the deck and then calls the shuffle method. The
shuffle method also needs to reset the value of size to indicate that all of the cards can be
dealt again.
2. The DeckTester.java file, found in the Activity4 Starter Code folder, provides a basic set
of Deck tests. It is similar to the DeckTester class you might have written in Activity 2.
Add additional code at the bottom of the main method to create a standard deck of 52 cards and
test the shuffle method. You can use the Deck toString method to “see” the cards after
every shuffle.
---------------------------------------------
publicclassShuffler {
privatestaticfinalintSHUFFLE_COUNT = 4;
privatestaticfinalintVALUE_COUNT = 4;
/**
* Tests shuffling methods.
* @param args is not used.
*/
publicstaticvoidmain(String[] args) {
System.out.println(\"Results of \" + SHUFFLE_COUNT + \" consecutive perfect shuffles:\");
int[] values1 = newint[VALUE_COUNT];
for (inti = 0; i < values1.length; i++) {
values1[i] = i;
}
for (intj = 1; j <= SHUFFLE_COUNT; j++) {
values1 = perfectShuffle(values1);
System.out.print(\" \" + j + \":\");
for (intk = 0; k < values1.length; k++) {
System.out.print(\" \" + values1[k]);
}
System.out.println();
}
System.out.println();
System.out.println(\"Results of \" + SHUFFLE_COUNT + \" consecutive efficient selection
shuffles:\");
int[] values2 = newint[VALUE_COUNT];
for (inti = 0; i < values2.length; i++) {
values2[i] = i;
}
for (intj = 1; j <= SHUFFLE_COUNT; j++) {
values2 = selectionShuffle(values2);
System.out.print(\" \" + j + \":\");
for (intk = 0; k < values2.length; k++) {
System.out.print(\" \" + values2[k]);
}
System.out.println();
}
System.out.println();
}
publicstaticint[] perfectShuffle(int[] values) {
int[] tVal = newint[values.length];
intc = 0;
for (inti = 0; i < (values.length + 1) / 2; i++) {
tVal[c] = values[i];
c += 2;
}
c = 1;
for (inti = (values.length + 1) / 2; i < values.length; i++) {
tVal[c] = values[i];
c += 2;
}
return tVal;
}
publicstaticint[] selectionShuffle(int[] values) {
for (inti = values.length - 1; i > 0; i--) {
intt = (int) Math.round(Math.random() * i);
inttmp = values[i];
values[i] = values[t];
values[t] = tmp;
}
return values;
}
}
------------------------------------------
publicclassDeckTester {
publicstaticvoidmain(String[] args) {
String[] ranks = { \"jack\", \"queen\", \"ki.
Introduction Now that the Card and Deck classes are completed, th.pdfcharanjit1717
Introduction:
Now that the Card and Deck classes are completed, the next class to design is ElevensBoard.
This class will contain the state (instance variables) and behavior (methods) necessary to play
the game of Elevens.
Here's the code:
import java.util.List;
import java.util.ArrayList;
/**
* The ElevensBoard class represents the board in a game of Elevens.
*/
public class ElevensBoard {
/**
* The size (number of cards) on the board.
*/
private static final int BOARD_SIZE = 9;
/**
* The ranks of the cards for this game to be sent to the deck.
*/
private static final String[] RANKS =
{"ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"};
/**
* The suits of the cards for this game to be sent to the deck.
*/
private static final String[] SUITS =
{"spades", "hearts", "diamonds", "clubs"};
/**
* The values of the cards for this game to be sent to the deck.
*/
private static final int[] POINT_VALUES =
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0};
/**
* The cards on this board.
*/
private Card[] cards;
/**
* The deck of cards being used to play the current game.
*/
private Deck deck;
/**
* Flag used to control debugging print statements.
*/
private static final boolean I_AM_DEBUGGING = false;
/**
* Creates a new ElevensBoard instance.
*/
public ElevensBoard() {
cards = new Card[BOARD_SIZE];
deck = new Deck(RANKS, SUITS, POINT_VALUES);
if (I_AM_DEBUGGING) {
System.out.println(deck);
System.out.println("----------");
}
dealMyCards();
}
/**
* Start a new game by shuffling the deck and
* dealing some cards to this board.
*/
public void newGame() {
deck.shuffle();
dealMyCards();
}
/**
* Accesses the size of the board.
* Note that this is not the number of cards it contains,
* which will be smaller near the end of a winning game.
* @return the size of the board
*/
public int size() {
return cards.length;
}
/**
* Determines if the board is empty (has no cards).
* @return true if this board is empty; false otherwise.
*/
public boolean isEmpty() {
for (int k = 0; k < cards.length; k++) {
if (cards[k] != null) {
return false;
}
}
return true;
}
/**
* Deal a card to the kth position in this board.
* If the deck is empty, the kth card is set to null.
* @param k the index of the card to be dealt.
*/
public void deal(int k) {
cards[k] = deck.deal();
}
/**
* Accesses the deck's size.
* @return the number of undealt cards left in the deck.
*/
public int deckSize() {
return deck.size();
}
/**
* Accesses a card on the board.
* @return the card at position k on the board.
* @param k is the board position of the card to return.
*/
public Card cardAt(int k) {
return cards[k];
}
/**
* Replaces selected cards on the board by dealing new cards.
* @param selectedCards is a list of the indices of the
* cards to be replaced.
*/
public void replaceSelectedCards(List selectedCards) {
for (Integer k : selectedCards) {
deal(k.intValue());
}
}
/**
* Gets the indexes of the actual (non-null) cards on the board.
*
* @return a List that contains the locations .
Here is the game description- Here is the sample game- Here is the req.pdftrishulinoverseas1
Here is the game description:
Here is the sample game:
Here is the requirement:
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
.
Here is the game description- Here is the sample game- Goal- Your goal (1).pdftrishulinoverseas1
Here is the game description:
Here is the sample game:
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
*/
public class Card {
/*.
Goal- Your goal in this assignment is to write a Java program that sim.pdfaaicommunication34
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
*/
public class Card {
/**
* The rank of the card which is a number from 1 to 13.
Need help with questions 2-4. Write assembly code to find absolute v.pdffeelinggifts
Need help with questions 2-4. Write assembly code to find absolute values of a data word (2 byte
word) stored at address $0200 and write the absolute value at $0300. Two 16-bit signed values
are stored at $0A00 (they each take 2 bytes). Please write assembly code to sort them in
descending order (so that $0A02 has the smallest, and $0A00 has the largest). Could you sort the
same way for 50 such words? Write a piece of Assembly code to (a) allocate a string named
message to contain good day! (all the underlined characters) at location $0F00; (b) How many
bytes would it need?; (c) The rest of the code you write should compare the contents in register
A with each character in this message. If a match is found, put the NULL character in register A,
and get register B to contain the character G (ascii value). Write HCS12 assembly code to do the
following. Using ORG and DC.W directives declare and initialize a data array of 8 words (1
word = 1 integer in I ICS 12 - 2 bytes) starting at address S0200. Their initial values are to be
A367, F238,0012, 1972, 1132, AB88, 7399, and 1864. You can name the array EightInts (see
class notes or text examples). Now start your program code at $4000 (ORG directive).
Configure the direction of port A, port B, and port H to be inputs (i.e. set data directional
registers). We are going to consider port A as the high byte, and port B as low byte of data words
we want to read and compare against eighties using a loop. The idea is to see whether port A and
port B values taken as a 2 byte integer is equal to any of the values in eightins. Before starting to
compare values, the program waits until port H is all 1\'s then it reads port A, and port B before
comparing against eighties. if a match is found, your program branches to label found and stay at
that instruction. If no match, the program should branch to no luck label and stay there.
Solution
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.util.*;
//Primary class for the game
public class Asteroids extends Applet implements Runnable, KeyListener{
/**
*
*/
private static final long serialVersionUID = 1L;
//the main thread becomes the game loop
Thread gameloop;
//use this as a double buffer
BufferedImage backbuffer;
//the main drawing object for the back buffer
Graphics2D g2d;
//toggle for drawing bounding boxes
boolean showBounds = false;
//create the asteroid array
int ASTEROIDS = 20;
Asteroid[] ast = new Asteroid[ASTEROIDS];
//create the bullet array
int BULLETS = 10;
Bullet[] bullet = new Bullet[BULLETS];
int currentBullet = 0;
//the player\'s ship
Ship ship = new Ship();
//create the identity transform (0.0)
AffineTransform identity = new AffineTransform();
//create a random number generator
Random rand = new Random();
//applet init event
public void init(){
//create the back buffer for smooth graphics
backbuffer = new BufferedImage(640, 480,BufferedImage.TYPE_INT_RGB);
g2d = backbuff.
This is a programshowing the use of a card game in which player’s place cards in a grid on
the table.The cards show different animals in between 1 to 4, where each quarter of the card
can have a different animal. Each player gets a secret animal. The secret animal is a
player's favorite.Theplayer's goal is to getseven animal cards showing this player's secret
animal connected on the table.
A storm warning siren emits sound uniformly in all directions. Along.pdffootstatus
A storm warning siren emits sound uniformly in all directions. Along a line that is drawn radially
outward from the sound source (the siren) determine the positions of two points, 0.77 m apart,
such that the intensity level at one point is 4.12 dB greater than the intensity level at the other.
point closer to siren: m
point farther from siren: m
Solution
Power of source = P
INtensity at r1 = I1 = P/4*pi*(r1)^2
Intensity at r2 = I2 = P/4*pi*(r2)^2
Now, 10log(I1/I2) = 4.12
20log(r2/r1) = 4.12
r2/r1 = 1.606
but r2 - r1 = 0.77
so r2 = 1.606(r2 - 0.77) = 1.606 r2 - 1.2366
r2 = 2.04 m
r1 = 1.27 m.
Without using cut, write a predicate split3 that splits a list of i.pdffootstatus
With regards to eipdemiology, match the statements in the right column with words or phrases
in the left column. The first reported patient in disease outbreak is called Includes the typical
symptoms of the disease Disease is constantly present in the population Disease producing
microbe Many people acquire disease in an area in a short time The study of the clinical history
of disease Contaminated inanimate objects One only gets this disease when the body is
weakened. Humans harbor pathogen but is not sick nor have symptoms Insects carry pathogen
and may carry it to person\'s good You get an infection from a member with food borne
infection Continual source of infection Person to person contact like STDs The ratio of number
of deaths over the number of folks that are sick Transmission of disease by an arthropod\'s bite
The ratio of the # of folks sick over total population The occurrence of new diseases cases
within defined population Insect and other arthropods are examples Pathoden Reservoir
Epidemiology Index case Case definition Epidemic Endemic Direct contact Incidence
Fomites Vectors Mechanical transmission Biological transmission Carriers Secondary cases
Morbidity rate Mortality rate Non-communicable disease Match the statements in the right
column with words or phrases in the left column. Colony Streak-plate technique Standard Plate
counts Iodine Dimerizes the nucleic acid Large number of bacterial cells on medium visible to
the naked eyes.
Solution
Index Case Case Definition Endemic Pathogen Epidemic Epidemology Fomites Secondary
Cases Carriers Mechanical Transmission Non Communicable Disease Reservoir Direct Contact
Mortality Rate Biological Transmission Morbidity Rate Incidence Vectors.
write a MATLAB GUI program that implements an ultrasound image viewi.pdffootstatus
Write a Java application that involves the following functions: A non-recursive method
intPower1(int n, int pow). The first argument is a number that is to be raised to a (non-negative)
power, and the second argument is the power. Do not use any methods of class Math. A
recursive method intPower2(int n, int pow) with the same functionality as above. Put both
methods into one class. The program should ask the user to input the numbers n and pow and
output the results. Name the project Hw4_2
Solution
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package chegg;
import java.util.Scanner;
public class Power {
int power1(int n,int pow)
{
int res = 1;
for(int i=1;i<=pow;i++)
res = res*n;
return res;
}
int power2(int n,int pow)
{
if(pow==0)
return 1;
if(pow==1)
return n;
return n*power2(n,pow-1);
}
public static void main(String[] args)
{
Power p = new Power();
int n,pow;
Scanner input = new Scanner(System.in);
System.out.println(\"Input the value of n : \");
n = input.nextInt();
System.out.println(\"Input the value of pow : \");
pow = input.nextInt();
System.out.println(\"Result of iterative function is : \" + p.power1(n, pow));
System.out.println(\"Result of recursive function is : \" + p.power2(n, pow));
}
}.
With regards to eipdemiology, match the statements in the right colum.pdffootstatus
Why might it be necessary for an organization to alter its targeting strategy over time? Use a
specific organizational example in your response.
Solution
the above said is correct, and some times they need to rethink about their decisions. the reason
the complete picture and the situations are different from our assumptions. so, when ever we
thinks that we took a wrong decision, there is nothing wrong to rethink about the strategy.
there are many examples in the history; one is from Bajaj two wheelers in India.
initially they only stick for producing scooters, and they does not go with bikes. but later they
changed their openion and started the production of bikes. they are the third largest two wheeler
seller in Indian market.
so,when the time comes one has to evaluate and analyse his strategies and if he finds any gaps or
problems he can change them..
Which of these are temperamental dimensionsoptionsAvoidant, re.pdffootstatus
Which of the following signals induces the disassembly of the nuclear lamina?
Phosphorylation by a mitotic kinase
Activation of a small GTPase
Fragmentation of the nuclear envelope
A conformational change in lamin A
DNA condensation
Solution
fragmentation of nuclear envelope signals induces the disassembly of the nuclear lamina.
Which of the following can cause OLS estimators to be biased Hetero.pdffootstatus
Which of the following best defines transaction persistence?
A. Database transactions should be all or nothing to protect the integrity of the database.
B. The database should be in a consistent state, and there should not be a risk of integrity
problems.
C. The database should be the same before and after a transaction has occurred.
D. Databases should be available to multiple users at the same time without endangering the
integrity of the data
Solution
B. Transaction persistence means that the state of the database security is the same after a
transaction has occurred. In addition, there is no risk of integrity problems. Answer A is incorrect
because it does not define transaction persistence. Answer C is wrong because transaction
persistence does not state that the database should be the same before and after a transaction.
Answer D is incorrect because even though databases should be available to multiple users at the
same time without endangering the integrity of the data, that fact is not a definition of transaction
persistence.
what is the relationship between capsular type of H. influenza and p.pdffootstatus
What is the name of the variable which contains a list of the arguments passed in to a script
during execution, along with the name of the script? Which command will return the length of
the str variable \"x\"? size(x) len(x) length(x) nchar(x) Which command will return the length
of the list variable \"y\"? size(y) len(y) length(y) nrow(y)
Solution
20.which command will return the length of the str variable \"x\"
Answer:len(x)
The method len() returns the length of the string
21.which command will return the length of the list variable \"y
Answer:len(y)
this method Gives the total length of the list..
What is the curve classification of ...I am working on the analysi.pdffootstatus
What is going to be the output of the following program: #include int main(void){int a = 0, b =
0; struct department{int did; int gst; int ugst;}; struct university{int state_rank; char
name[10]; struct department ndpt[3];}NDSU; NDSU = {1, {\'N\', \'D\', \'S\', \'U\'}, {1, 10, 200,
2, 20, 300, 3, 30, 400}}; for(int i = 0; i
Solution
There is an error in the program. NDSU is a data type(user defined), and therefore cannot be
initialized.
But after a minute modifications, the output is explained in the comments part:
#include
int main(void)
{
int a = 0, b = 0;
struct department //Declares a structure department.
{
int did;
int gst;
int ugst;
};
struct university //Declares a structure university.
{
int state_rank;
char name[10];
struct department ndpt[3];
}NDSU = {1, {\'N\', \'D\', \'S\', \'U\'}, {1, 10, 200, 2, 20, 300, 3, 30, 400}}; //Initializes the
university structure.
//State_rank = 1.
//name = \"NDSU\".
//With 3 departments.
//Department 1: did = 1, gst = 10, ugst = 200.
//Department 2: did = 2, gst = 20, ugst = 300.
//Department 3: did = 3, gst = 30, ugst = 400.
for(int i = 0; i < 3; i++) //For each department value.
{
a = a + NDSU.ndpt[i].gst; //Sum up the gst values to a. 10 + 20 + 30
b = a + NDSU.ndpt[i].ugst; //Sum of a and ugst value is overwritten to b. First time its, 10 +
200. Second time its, 30 + 300. Finally its 60 + 400 = 460 is stored.
}
printf(\"%d and %d\ \", a/3, b/3); //Prints the average gst, and ugst values: 20, and 153.
return 0;
}.
Water is essential to all living organisms. Discuss THREE properties .pdffootstatus
Verified the following trig identities and show all work.
csc4 t-cot4 t = csc2t+cot2 t
cosB/1-sinB = secB+tanB
1/csc y-cot y = csc y + cot y
Cot 4u-1/cot 4u+1 = 1-tan 4u/1+tan 4u
(sec t + tan t)2 = 1+sin t / 1-sin t
Cos3x –sin3x /cos x-sin x = 1+sin x cos x
Csc x /1+csc x – csc x/ 1-csc x= 2sec2 x
(1-tan2 theta)2 = sec4 theta – 4 tan2 theta
Solution
1)csc4t-cot4t
a2-b2=(a-b)(a+b)
=(csc2t-cot2t)(csc2t+cot2t)
=1*(csc2t+cot2t)
=csc2t+cot2t
2)cosB/1-sinB
multiply and divide by (1+sinB)
=cosB(1+sinB)/((1-sinB)(1+sinB))
=cosB(1+sinB)/(1-sin2B)
=cosB(1+sinB)/(cos2B)
=(1+sinB)/cosB
=(1/cosB)+(sinB/cosB)
=secB+tanB.
tree to answer question 2. n Arabidopsis arenosa Arabidopsis halleri .pdffootstatus
Toxaphene is an insecticide that has been identified as a pollutant in the Great Lakes ecosystem.
To investigate the effect of toxaphene exposure on animals, groups of rats were given toxaphene
in their diet. The article “Reproduction Study of Toxaphene in the Rat” (J. of Environ. Sci.
Health, 1988: 101-126) reports weight gains (in grams) for rats given a low dose (4 ppm) and for
control rats whose diet did not include the insecticide. The sample standard deviation for 23
female control rats was 32 g and for 20 female low-dose rats was 54 g. Does this data suggest
that there is more variability in low-dose weight gains than in control weight gains? Assuming
normality, carry out a test of hypotheses at significance level .05
For this problem, make a two-sided t interval & perform an F test for the ratio of variance, &
create a confidence interval for the ratio of the variance.
Solution.
The plant pathogen Xylella fastidiosa is a gram negative that attach.pdffootstatus
The number of passengers (including the driver) in cars that cross a certain bridge is a random
variable Y having mean E(Y) = 2.7 and variance V(Y) = 1.2. The toll on the bridge is $3.00 per
car plus $0.50 per person in the car. The mean and variance of the total amount of money that is
collected from a car that crosses the bridge are:
(a) mean = $8.60, variance = $.30
(b) mean = $4.35, variance = $3.30
(c) mean = $8.60, variance = $.60
(d) mean = $4.35, variance = $.30
(e) mean = $1.35, variance = $.30
Solution
The amount they pay in terms of Y is
A = 3.00 + 0.50Y
Thus,
E(A) = E(3.00 + 0.50Y) = 3.00 + 0.50E(Y) = 3.00 + 0.50*2.7
E(A) = 4.35
Also,
Var(A) = Var(3.00 + 0.50Y) = 0.50^2 Var(Y) = 0.50^2 * 1.2
Var(A) = 0.30
Thus, it is OPTION D. [ANSWER, D].
The region labeled with the letter B is transcribed into mRNA True.pdffootstatus
the projected number of households( in millions) with digital video records thats allow viewers
to record shows onto a server and skip commercials are in the following 5. The projected number
of households (in millions) with digital video recorders that allow viewers to record shows onto a
server and skip commercials are given in the following table: Year Households 31.2 a) Let t = 0
correspond to the beginning of 2006, and use QuadReg to find a second- 2010 130.2 2006 2008
71.6 2009 97.0 2007 49.0 degree polynomial regression model based on the given data. (2 pts) b)
Using your regression equation, find the number of households in 2008. (2 pts) c) Using your
regression equation, find the number of households in 2013. (2 pts)
Solution
a)
Using technology to get the best quadratic fit,
y^ = 2.4t^2 + 15t + 31.4 [answer]
where y^ = predicted number of housholds.
b)
Plugging in t = 2 to y^ above,
y^ = 2.4(2)^2 + 15(2) + 31.4 = 71 [answer]
c)
Plugging in y = 7 above,
y^ = 2.4(7)^2 + 15(7) + 31.4 = 254 [answer].
The positron decay of 15 o goes directly to the ground state of,15 N;.pdffootstatus
The plant pathogen Xylella fastidiosa is a gram negative that attaches to surfaces and forms a
biofilm in host plants. Which of the following typically triggers an immune response?
a)
Pili
b)
Teichoic
acid
c)
LPS
d)
EPS
Solution
Ans--(C) : LPS
Lipopolysaccharide (LPS) is the predominant macromolecule displayed on the cell surface of
Gram-negative bacteria and thus mediates bacterial interactions with the environment and
potential hosts Utilizing a mutant that produces truncated O antigen we present results that link
this LPS structural alteration to a significant decrease in the attachment of X,Xylella fastidiosa is
a plant pathogenic bacterium that lives inside the host xylem vessels where it forms biofilm
believed to be responsible for disrupting the passage of water and nutrients..
a) What is the Chromosome Theory of Inheritance and how was it deter.pdffootstatus
a) What is the Chromosome Theory of Inheritance and how was it determined? (SHOW WORK
& EXPLAIN)
b) Describe the contributions of Sutton, Boveri, McClung, Stevens, Wilson and Morgan to
determining that genetic information is carried on chromosomes. (SHOW WORK & EXPLAIN)
c) Describe the XX-XO, XX-XY and ZZ-ZW mechanisms of sex determination and give
examples of organisms that use each mechanism. (SHOW WORK & EXPLAIN)
d) How does the environment affect sexual phenotype in turtles and alligators? (SHOW WORK
& EXPLAIN)
Solution
a) Chromosomal Theory of Inheritance is a fundamental theory of genetics.Thomas Hunt
Morgan establishes the Chromosomal theory of heredity.In 1907 Morgan was based on
experiments by using Drosphila melanogaster or fruit flies. Drosphila have red eyes.Red eye
colour is dominant.Morgan discovered a recessive mutation that caused white eyes.
B) Boveri-Sutton chromosome theory identifies chromosomes as the carriers of genetic material
which states that chromosomes carry the unit of heredity.
McClung : A zoologist studied the behaviour of chromosomes in the sex cells and discovered the
sex determining chromosome.
Stevens: Stevens was interested in the process of sex determination.
Morgan proposed the Chromosomal Theory of Heredity by using a common fruit fly.
C) Sex determination is a biological system that determines the development of sexual
characteristics.
XX-XO types : In this type females have two homomorphic sex chromosomes XX ,male have
one sex chromosome XO. This type of sex determination seen in cockroaches.
XX-XY : This sex determination occurs in human beings.Females have two identical
homologous sex chromosome XX and males have XY.
ZZ-ZW : Females carry two types of sex chromosome ZW heterogametic and males carry ZZ
homogametic. This type of sex determination occurs in fishes reptiles.
D) Sex determination in reptiles are classified into two categories that is genotypic sex
determination and temperature dependent. Environmental sex determination in which
temperature is a crucial factor in embryonic development. In many turtle species eggs from
cooler nests hatch males and from warmer nests hatch the females..
provide a brief definition of self assemblySolutionMolecular s.pdffootstatus
Prove that the chromatic number of a cycle graph_n of odd length equals 3.
Solution
Chromatic Number: The chromatic number of a graph G is the least k for which a k-coloring of
G exists.
First note that the chromatic number must be at least 2 for any graph which has an edge in it,
including all cycles. We now prove the theorem by induction on n. We will consider two base
cases, C3 and C4. C3 is isomorphic to K3 which has chromatic number 3. C4 can be colored
with two colors by giving opposing corners of the square the same color. For n > 4, we can take
a coloring of Cn-2 and insert 2 adjacent vertices and edges and then color the new vertices
appropriately to get a coloring of Cn. Thus the chromatic number of Cn is not greater than that of
Cn-2. In the case where n is odd, note that if Cn had chromatic number 2, we could remove two
adjacent vertices and edges to get a 2-coloring of Cn-2 which contradicts the inductive
hypothesis since n-2 must be odd if n is odd. Therefore for odd numbers the chromatic number
will be 2+1 = 3..
More Related Content
Similar to QuestionProblem 1 In a source file carddeck.cpp, provide an impl.pdf
Here is the game description- Here is the sample game- Goal- Your goal (1).pdftrishulinoverseas1
Here is the game description:
Here is the sample game:
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
*/
public class Card {
/*.
Goal- Your goal in this assignment is to write a Java program that sim.pdfaaicommunication34
Goal: Your goal in this assignment is to write a Java program that simulates this card game
and prints the sequence of played cards and the winner at the end, as shown above. Use
Dealer.java, GeneralPlayer.java, Main.java, Card.java, Table.java, and Deck.java, complete
CardPlayer.java and CardTable.java.
Given codes:
Dealer.java :
import java.util.Random;
/**
* This class represents a dealer who shuffles a deck of cards and
* distributes them to players.
*/
public class Dealer {
private Deck deck;
/**
* Creates a new Dealer object with the specified players and deck.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to shuffle and distribute
*/
public Dealer(CardPlayer[] players, Deck deck) {
this.deck = deck;
this.shuffle();
this.distribute(players, this.deck);
}
/**
* Distributes the cards in the deck to the specified players.
*
* @param players the array of CardPlayer objects to distribute the cards to
* @param deck the Deck object to distribute
*/
private void distribute(CardPlayer[] players, Deck deck) {
for (int cardCounter = 0; cardCounter < deck.cards.length; cardCounter += players.length) {
for (int playerCounter = 0; playerCounter < players.length; playerCounter++) {
players[playerCounter].addToHand(deck.cards[cardCounter + playerCounter]);
}
}
}
/**
* Shuffles the cards in the deck; it generates two random variables as the card
* index and swaps them.
*/
private void shuffle() {
Random randomNumber = new Random();
for (int card = 0; card < this.deck.cards.length; card++) {
swap(randomNumber.nextInt(deck.cards.length), randomNumber.nextInt(deck.cards.length));
}
}
/**
* Swaps the positions of two cards in the deck.
*
* @param random1 the index of the first card to swap
* @param random2 the index of the second card to swap
*/
private void swap(int random1, int random2) {
Card temp;
temp = this.deck.cards[random1];
this.deck.cards[random1] = this.deck.cards[random2];
this.deck.cards[random2] = temp;
}
/**
* Prints out the identifier of each card in the deck.
*/
public void showDeck() {
for (Card card : this.deck.cards) {
System.out.println(card.identifier);
}
}
}
GeneralPlayer.java:
/**
* An abstract class representing a general player.
*
* @param <T> the type of the value returned by the player's play method.
*/
public abstract class GeneralPlayer<T> {
/** The name of the player. */
public String name;
/**
* Creates a new GeneralPlayer with a default name.
*/
public GeneralPlayer() {
this.name = "General Player";
}
/**
* Creates a new GeneralPlayer with the given name.
*
* @param name the name of the player.
*/
public GeneralPlayer(String name) {
this.name = name;
}
/**
* Makes a move or takes an action, depending on the implementation.
*
* @return the result of the player's action or move.
*/
public abstract T play();
}
Card.java:
/**
* A class that represents a playing card with a rank and suit.
*/
public class Card {
/**
* The rank of the card which is a number from 1 to 13.
Need help with questions 2-4. Write assembly code to find absolute v.pdffeelinggifts
Need help with questions 2-4. Write assembly code to find absolute values of a data word (2 byte
word) stored at address $0200 and write the absolute value at $0300. Two 16-bit signed values
are stored at $0A00 (they each take 2 bytes). Please write assembly code to sort them in
descending order (so that $0A02 has the smallest, and $0A00 has the largest). Could you sort the
same way for 50 such words? Write a piece of Assembly code to (a) allocate a string named
message to contain good day! (all the underlined characters) at location $0F00; (b) How many
bytes would it need?; (c) The rest of the code you write should compare the contents in register
A with each character in this message. If a match is found, put the NULL character in register A,
and get register B to contain the character G (ascii value). Write HCS12 assembly code to do the
following. Using ORG and DC.W directives declare and initialize a data array of 8 words (1
word = 1 integer in I ICS 12 - 2 bytes) starting at address S0200. Their initial values are to be
A367, F238,0012, 1972, 1132, AB88, 7399, and 1864. You can name the array EightInts (see
class notes or text examples). Now start your program code at $4000 (ORG directive).
Configure the direction of port A, port B, and port H to be inputs (i.e. set data directional
registers). We are going to consider port A as the high byte, and port B as low byte of data words
we want to read and compare against eighties using a loop. The idea is to see whether port A and
port B values taken as a 2 byte integer is equal to any of the values in eightins. Before starting to
compare values, the program waits until port H is all 1\'s then it reads port A, and port B before
comparing against eighties. if a match is found, your program branches to label found and stay at
that instruction. If no match, the program should branch to no luck label and stay there.
Solution
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.util.*;
//Primary class for the game
public class Asteroids extends Applet implements Runnable, KeyListener{
/**
*
*/
private static final long serialVersionUID = 1L;
//the main thread becomes the game loop
Thread gameloop;
//use this as a double buffer
BufferedImage backbuffer;
//the main drawing object for the back buffer
Graphics2D g2d;
//toggle for drawing bounding boxes
boolean showBounds = false;
//create the asteroid array
int ASTEROIDS = 20;
Asteroid[] ast = new Asteroid[ASTEROIDS];
//create the bullet array
int BULLETS = 10;
Bullet[] bullet = new Bullet[BULLETS];
int currentBullet = 0;
//the player\'s ship
Ship ship = new Ship();
//create the identity transform (0.0)
AffineTransform identity = new AffineTransform();
//create a random number generator
Random rand = new Random();
//applet init event
public void init(){
//create the back buffer for smooth graphics
backbuffer = new BufferedImage(640, 480,BufferedImage.TYPE_INT_RGB);
g2d = backbuff.
This is a programshowing the use of a card game in which player’s place cards in a grid on
the table.The cards show different animals in between 1 to 4, where each quarter of the card
can have a different animal. Each player gets a secret animal. The secret animal is a
player's favorite.Theplayer's goal is to getseven animal cards showing this player's secret
animal connected on the table.
A storm warning siren emits sound uniformly in all directions. Along.pdffootstatus
A storm warning siren emits sound uniformly in all directions. Along a line that is drawn radially
outward from the sound source (the siren) determine the positions of two points, 0.77 m apart,
such that the intensity level at one point is 4.12 dB greater than the intensity level at the other.
point closer to siren: m
point farther from siren: m
Solution
Power of source = P
INtensity at r1 = I1 = P/4*pi*(r1)^2
Intensity at r2 = I2 = P/4*pi*(r2)^2
Now, 10log(I1/I2) = 4.12
20log(r2/r1) = 4.12
r2/r1 = 1.606
but r2 - r1 = 0.77
so r2 = 1.606(r2 - 0.77) = 1.606 r2 - 1.2366
r2 = 2.04 m
r1 = 1.27 m.
Without using cut, write a predicate split3 that splits a list of i.pdffootstatus
With regards to eipdemiology, match the statements in the right column with words or phrases
in the left column. The first reported patient in disease outbreak is called Includes the typical
symptoms of the disease Disease is constantly present in the population Disease producing
microbe Many people acquire disease in an area in a short time The study of the clinical history
of disease Contaminated inanimate objects One only gets this disease when the body is
weakened. Humans harbor pathogen but is not sick nor have symptoms Insects carry pathogen
and may carry it to person\'s good You get an infection from a member with food borne
infection Continual source of infection Person to person contact like STDs The ratio of number
of deaths over the number of folks that are sick Transmission of disease by an arthropod\'s bite
The ratio of the # of folks sick over total population The occurrence of new diseases cases
within defined population Insect and other arthropods are examples Pathoden Reservoir
Epidemiology Index case Case definition Epidemic Endemic Direct contact Incidence
Fomites Vectors Mechanical transmission Biological transmission Carriers Secondary cases
Morbidity rate Mortality rate Non-communicable disease Match the statements in the right
column with words or phrases in the left column. Colony Streak-plate technique Standard Plate
counts Iodine Dimerizes the nucleic acid Large number of bacterial cells on medium visible to
the naked eyes.
Solution
Index Case Case Definition Endemic Pathogen Epidemic Epidemology Fomites Secondary
Cases Carriers Mechanical Transmission Non Communicable Disease Reservoir Direct Contact
Mortality Rate Biological Transmission Morbidity Rate Incidence Vectors.
write a MATLAB GUI program that implements an ultrasound image viewi.pdffootstatus
Write a Java application that involves the following functions: A non-recursive method
intPower1(int n, int pow). The first argument is a number that is to be raised to a (non-negative)
power, and the second argument is the power. Do not use any methods of class Math. A
recursive method intPower2(int n, int pow) with the same functionality as above. Put both
methods into one class. The program should ask the user to input the numbers n and pow and
output the results. Name the project Hw4_2
Solution
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package chegg;
import java.util.Scanner;
public class Power {
int power1(int n,int pow)
{
int res = 1;
for(int i=1;i<=pow;i++)
res = res*n;
return res;
}
int power2(int n,int pow)
{
if(pow==0)
return 1;
if(pow==1)
return n;
return n*power2(n,pow-1);
}
public static void main(String[] args)
{
Power p = new Power();
int n,pow;
Scanner input = new Scanner(System.in);
System.out.println(\"Input the value of n : \");
n = input.nextInt();
System.out.println(\"Input the value of pow : \");
pow = input.nextInt();
System.out.println(\"Result of iterative function is : \" + p.power1(n, pow));
System.out.println(\"Result of recursive function is : \" + p.power2(n, pow));
}
}.
With regards to eipdemiology, match the statements in the right colum.pdffootstatus
Why might it be necessary for an organization to alter its targeting strategy over time? Use a
specific organizational example in your response.
Solution
the above said is correct, and some times they need to rethink about their decisions. the reason
the complete picture and the situations are different from our assumptions. so, when ever we
thinks that we took a wrong decision, there is nothing wrong to rethink about the strategy.
there are many examples in the history; one is from Bajaj two wheelers in India.
initially they only stick for producing scooters, and they does not go with bikes. but later they
changed their openion and started the production of bikes. they are the third largest two wheeler
seller in Indian market.
so,when the time comes one has to evaluate and analyse his strategies and if he finds any gaps or
problems he can change them..
Which of these are temperamental dimensionsoptionsAvoidant, re.pdffootstatus
Which of the following signals induces the disassembly of the nuclear lamina?
Phosphorylation by a mitotic kinase
Activation of a small GTPase
Fragmentation of the nuclear envelope
A conformational change in lamin A
DNA condensation
Solution
fragmentation of nuclear envelope signals induces the disassembly of the nuclear lamina.
Which of the following can cause OLS estimators to be biased Hetero.pdffootstatus
Which of the following best defines transaction persistence?
A. Database transactions should be all or nothing to protect the integrity of the database.
B. The database should be in a consistent state, and there should not be a risk of integrity
problems.
C. The database should be the same before and after a transaction has occurred.
D. Databases should be available to multiple users at the same time without endangering the
integrity of the data
Solution
B. Transaction persistence means that the state of the database security is the same after a
transaction has occurred. In addition, there is no risk of integrity problems. Answer A is incorrect
because it does not define transaction persistence. Answer C is wrong because transaction
persistence does not state that the database should be the same before and after a transaction.
Answer D is incorrect because even though databases should be available to multiple users at the
same time without endangering the integrity of the data, that fact is not a definition of transaction
persistence.
what is the relationship between capsular type of H. influenza and p.pdffootstatus
What is the name of the variable which contains a list of the arguments passed in to a script
during execution, along with the name of the script? Which command will return the length of
the str variable \"x\"? size(x) len(x) length(x) nchar(x) Which command will return the length
of the list variable \"y\"? size(y) len(y) length(y) nrow(y)
Solution
20.which command will return the length of the str variable \"x\"
Answer:len(x)
The method len() returns the length of the string
21.which command will return the length of the list variable \"y
Answer:len(y)
this method Gives the total length of the list..
What is the curve classification of ...I am working on the analysi.pdffootstatus
What is going to be the output of the following program: #include int main(void){int a = 0, b =
0; struct department{int did; int gst; int ugst;}; struct university{int state_rank; char
name[10]; struct department ndpt[3];}NDSU; NDSU = {1, {\'N\', \'D\', \'S\', \'U\'}, {1, 10, 200,
2, 20, 300, 3, 30, 400}}; for(int i = 0; i
Solution
There is an error in the program. NDSU is a data type(user defined), and therefore cannot be
initialized.
But after a minute modifications, the output is explained in the comments part:
#include
int main(void)
{
int a = 0, b = 0;
struct department //Declares a structure department.
{
int did;
int gst;
int ugst;
};
struct university //Declares a structure university.
{
int state_rank;
char name[10];
struct department ndpt[3];
}NDSU = {1, {\'N\', \'D\', \'S\', \'U\'}, {1, 10, 200, 2, 20, 300, 3, 30, 400}}; //Initializes the
university structure.
//State_rank = 1.
//name = \"NDSU\".
//With 3 departments.
//Department 1: did = 1, gst = 10, ugst = 200.
//Department 2: did = 2, gst = 20, ugst = 300.
//Department 3: did = 3, gst = 30, ugst = 400.
for(int i = 0; i < 3; i++) //For each department value.
{
a = a + NDSU.ndpt[i].gst; //Sum up the gst values to a. 10 + 20 + 30
b = a + NDSU.ndpt[i].ugst; //Sum of a and ugst value is overwritten to b. First time its, 10 +
200. Second time its, 30 + 300. Finally its 60 + 400 = 460 is stored.
}
printf(\"%d and %d\ \", a/3, b/3); //Prints the average gst, and ugst values: 20, and 153.
return 0;
}.
Water is essential to all living organisms. Discuss THREE properties .pdffootstatus
Verified the following trig identities and show all work.
csc4 t-cot4 t = csc2t+cot2 t
cosB/1-sinB = secB+tanB
1/csc y-cot y = csc y + cot y
Cot 4u-1/cot 4u+1 = 1-tan 4u/1+tan 4u
(sec t + tan t)2 = 1+sin t / 1-sin t
Cos3x –sin3x /cos x-sin x = 1+sin x cos x
Csc x /1+csc x – csc x/ 1-csc x= 2sec2 x
(1-tan2 theta)2 = sec4 theta – 4 tan2 theta
Solution
1)csc4t-cot4t
a2-b2=(a-b)(a+b)
=(csc2t-cot2t)(csc2t+cot2t)
=1*(csc2t+cot2t)
=csc2t+cot2t
2)cosB/1-sinB
multiply and divide by (1+sinB)
=cosB(1+sinB)/((1-sinB)(1+sinB))
=cosB(1+sinB)/(1-sin2B)
=cosB(1+sinB)/(cos2B)
=(1+sinB)/cosB
=(1/cosB)+(sinB/cosB)
=secB+tanB.
tree to answer question 2. n Arabidopsis arenosa Arabidopsis halleri .pdffootstatus
Toxaphene is an insecticide that has been identified as a pollutant in the Great Lakes ecosystem.
To investigate the effect of toxaphene exposure on animals, groups of rats were given toxaphene
in their diet. The article “Reproduction Study of Toxaphene in the Rat” (J. of Environ. Sci.
Health, 1988: 101-126) reports weight gains (in grams) for rats given a low dose (4 ppm) and for
control rats whose diet did not include the insecticide. The sample standard deviation for 23
female control rats was 32 g and for 20 female low-dose rats was 54 g. Does this data suggest
that there is more variability in low-dose weight gains than in control weight gains? Assuming
normality, carry out a test of hypotheses at significance level .05
For this problem, make a two-sided t interval & perform an F test for the ratio of variance, &
create a confidence interval for the ratio of the variance.
Solution.
The plant pathogen Xylella fastidiosa is a gram negative that attach.pdffootstatus
The number of passengers (including the driver) in cars that cross a certain bridge is a random
variable Y having mean E(Y) = 2.7 and variance V(Y) = 1.2. The toll on the bridge is $3.00 per
car plus $0.50 per person in the car. The mean and variance of the total amount of money that is
collected from a car that crosses the bridge are:
(a) mean = $8.60, variance = $.30
(b) mean = $4.35, variance = $3.30
(c) mean = $8.60, variance = $.60
(d) mean = $4.35, variance = $.30
(e) mean = $1.35, variance = $.30
Solution
The amount they pay in terms of Y is
A = 3.00 + 0.50Y
Thus,
E(A) = E(3.00 + 0.50Y) = 3.00 + 0.50E(Y) = 3.00 + 0.50*2.7
E(A) = 4.35
Also,
Var(A) = Var(3.00 + 0.50Y) = 0.50^2 Var(Y) = 0.50^2 * 1.2
Var(A) = 0.30
Thus, it is OPTION D. [ANSWER, D].
The region labeled with the letter B is transcribed into mRNA True.pdffootstatus
the projected number of households( in millions) with digital video records thats allow viewers
to record shows onto a server and skip commercials are in the following 5. The projected number
of households (in millions) with digital video recorders that allow viewers to record shows onto a
server and skip commercials are given in the following table: Year Households 31.2 a) Let t = 0
correspond to the beginning of 2006, and use QuadReg to find a second- 2010 130.2 2006 2008
71.6 2009 97.0 2007 49.0 degree polynomial regression model based on the given data. (2 pts) b)
Using your regression equation, find the number of households in 2008. (2 pts) c) Using your
regression equation, find the number of households in 2013. (2 pts)
Solution
a)
Using technology to get the best quadratic fit,
y^ = 2.4t^2 + 15t + 31.4 [answer]
where y^ = predicted number of housholds.
b)
Plugging in t = 2 to y^ above,
y^ = 2.4(2)^2 + 15(2) + 31.4 = 71 [answer]
c)
Plugging in y = 7 above,
y^ = 2.4(7)^2 + 15(7) + 31.4 = 254 [answer].
The positron decay of 15 o goes directly to the ground state of,15 N;.pdffootstatus
The plant pathogen Xylella fastidiosa is a gram negative that attaches to surfaces and forms a
biofilm in host plants. Which of the following typically triggers an immune response?
a)
Pili
b)
Teichoic
acid
c)
LPS
d)
EPS
Solution
Ans--(C) : LPS
Lipopolysaccharide (LPS) is the predominant macromolecule displayed on the cell surface of
Gram-negative bacteria and thus mediates bacterial interactions with the environment and
potential hosts Utilizing a mutant that produces truncated O antigen we present results that link
this LPS structural alteration to a significant decrease in the attachment of X,Xylella fastidiosa is
a plant pathogenic bacterium that lives inside the host xylem vessels where it forms biofilm
believed to be responsible for disrupting the passage of water and nutrients..
a) What is the Chromosome Theory of Inheritance and how was it deter.pdffootstatus
a) What is the Chromosome Theory of Inheritance and how was it determined? (SHOW WORK
& EXPLAIN)
b) Describe the contributions of Sutton, Boveri, McClung, Stevens, Wilson and Morgan to
determining that genetic information is carried on chromosomes. (SHOW WORK & EXPLAIN)
c) Describe the XX-XO, XX-XY and ZZ-ZW mechanisms of sex determination and give
examples of organisms that use each mechanism. (SHOW WORK & EXPLAIN)
d) How does the environment affect sexual phenotype in turtles and alligators? (SHOW WORK
& EXPLAIN)
Solution
a) Chromosomal Theory of Inheritance is a fundamental theory of genetics.Thomas Hunt
Morgan establishes the Chromosomal theory of heredity.In 1907 Morgan was based on
experiments by using Drosphila melanogaster or fruit flies. Drosphila have red eyes.Red eye
colour is dominant.Morgan discovered a recessive mutation that caused white eyes.
B) Boveri-Sutton chromosome theory identifies chromosomes as the carriers of genetic material
which states that chromosomes carry the unit of heredity.
McClung : A zoologist studied the behaviour of chromosomes in the sex cells and discovered the
sex determining chromosome.
Stevens: Stevens was interested in the process of sex determination.
Morgan proposed the Chromosomal Theory of Heredity by using a common fruit fly.
C) Sex determination is a biological system that determines the development of sexual
characteristics.
XX-XO types : In this type females have two homomorphic sex chromosomes XX ,male have
one sex chromosome XO. This type of sex determination seen in cockroaches.
XX-XY : This sex determination occurs in human beings.Females have two identical
homologous sex chromosome XX and males have XY.
ZZ-ZW : Females carry two types of sex chromosome ZW heterogametic and males carry ZZ
homogametic. This type of sex determination occurs in fishes reptiles.
D) Sex determination in reptiles are classified into two categories that is genotypic sex
determination and temperature dependent. Environmental sex determination in which
temperature is a crucial factor in embryonic development. In many turtle species eggs from
cooler nests hatch males and from warmer nests hatch the females..
provide a brief definition of self assemblySolutionMolecular s.pdffootstatus
Prove that the chromatic number of a cycle graph_n of odd length equals 3.
Solution
Chromatic Number: The chromatic number of a graph G is the least k for which a k-coloring of
G exists.
First note that the chromatic number must be at least 2 for any graph which has an edge in it,
including all cycles. We now prove the theorem by induction on n. We will consider two base
cases, C3 and C4. C3 is isomorphic to K3 which has chromatic number 3. C4 can be colored
with two colors by giving opposing corners of the square the same color. For n > 4, we can take
a coloring of Cn-2 and insert 2 adjacent vertices and edges and then color the new vertices
appropriately to get a coloring of Cn. Thus the chromatic number of Cn is not greater than that of
Cn-2. In the case where n is odd, note that if Cn had chromatic number 2, we could remove two
adjacent vertices and edges to get a 2-coloring of Cn-2 which contradicts the inductive
hypothesis since n-2 must be odd if n is odd. Therefore for odd numbers the chromatic number
will be 2+1 = 3..
Match the Statements below with bacteriological tests. Eosin-methyle.pdffootstatus
Many non-scientists have focused their criticism of evolution on the fact that even scientists have
criticized Darwin’s theory. Is this true? In what respect did Darwin get it wrong, or maybe in
what way has Darwin’s theory been modified?
Solution
The \"Origin of Species\" of Darwin described about the heritable change in an organism over a
period of time due to natural selection. Scientists also criticized of Danwin\'s opinion on use and
disuse theory. At the time of Origin of species, Darwin do not know about the existed of
microorganisms and his theory of tree of life became wrong. Pangenesis theory of Darwin also
became wrong as he do not know anything about genetics..
Many non-scientists have focused their criticism of evolution on the.pdffootstatus
M2-13 Identifying Transactions and Preparing Journal Entries [LO 2-3] J.K. Builders was
incorporated on July 1 a. Received $83,000 cash invested by owners and issued common stock.
b. Bought an unused field from a local farmer by paying $73,000 cash. As a construction site for
smaller projects, it is estimated to be worth $78,000 to J.K. Builders c. Alumber supplier
delivered lumber supplies to J.K. Builders for future use. The lumber supplies would have
normally sold for $23,000, but the supplier gave J.K. Builders a 10 percent discount. J.K.
Builders has not yet received the $20,700 bill from the supplier d. Borrowed $38,000 from the
bank with a plan to use the funds to build a small workshop in August. The loan must be repaid
in two years. e. One of the owners sold $23,000 worth of his common stock to another
shareholder for $24,000 Prepare journal entries for the above transactions from the first month of
business. (If no entry is required fora transactionlevent, selec \"No Journal Entry Required\" in
the first account field.)
Solution
Ref Account Debit Credit a Cash 83000 Common stock 83000 b Land 73000 Cash
73000 c Lumber supplies 20700 Accounts payable 20700 d cash 38000 Notes
payable 38000 e No entry.
It has been observed that F_st increases with the distance between po.pdffootstatus
iQ2 In a study about children?s pocket money, two samples of schoolchildren were asked how
much money they received each week. In one sample, of size 80, the mean is ?6.65. In the other
sample, of size 41, the mean is pound 8.21. Calculate the mean based on the combined sample.
Give your answer correct to two decimal places. (Do NOT include the pound sign in your
answer.)
Solution
n1=80 x1=6.65
n2=41 x2=8.21
combined mean = (n1*x1+n2*x2)/( n1+n2)
=( 80*6.65+41*8.21) /( 80+41)
=868.61/121
=7.1785
Combined mean =7.18 ( two decimals).
Let R be an integral domain and F a field such that R is a subring of.pdffootstatus
Let f(x), g(x), h(x), epsilon F[x] such that f(x) does not equal 0. Prove that: If f(x) | g(x) and f(x) |
[g(x)^2 +h(x)], then f(x). Hint: g(x)^2 = g(x) * g(x)
Solution
given f(x) | g(x)
=>g(x)=k.f(x)
=>g(x)2=k2.f(x)2
=>g(x)2=l.f(x) eq1 where l=k2.f(x)
and
f(x) | [g(x)^2 +h(x)]
=>[g(x)^2 +h(x)]=m.f(x) eq2
eq2-eq1
=>h(x)=(l-m)f(x)=p.f(x) where p=l-m
there fore f(x)|h(x)
then f(x). Hint: g(x)^2 = g(x) * g(x).
Judith, Martha, and Sophia are organizing their backpacks. While org.pdffootstatus
JavaScript
1.) Write code that computes the sum of the values stored in an integer array named myArray
(you can assume that the array exists and already has values in it).
2.) Write code that computes the average of the values stored in an integer array named myArray
(you can assume that the array exists and already has values in it)
Solution
Question 1:
var sum = 0;
for(var i=0; i.
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Thesis Statement for students diagnonsed withADHD.ppt
QuestionProblem 1 In a source file carddeck.cpp, provide an impl.pdf
1. Question:
Problem 1: In a source file carddeck.cpp, provide an implementation for the Card class, i.e.,
please provide an implementation for all the member functions defined in the class. Observe that
there are two constructors: a default constructor to create the card representing Ace of Spades (or
AS) and a second constructor that defines a custom card with given rank and suit. The member
function toString() should return a two character string representation of a card, i.e. it would
return QH for Queen of Hearts, TD for Ten of Diamonds, 5S for Five of Spades, etc.
The objective of this assignment is to write classes to simulate a deck of cards. Recall that a deck
of cards consists of 52 cards consisting of the 13 ranks (2, 3, 4, 5, 6, 7, 8, 9, T(ten), J(jack),
Q(queen), K(kind), and A(ace) paired with the four suits CLUBS, DIAMONDS, HEARTS, and
SPADES. Consider the following header file carddeck.h:
#ifndef CARDDECK_H
#define CARDDECK
#include
using namespace std;
enum Suit
{
CLUBS, DIAMONDS, HEARTS, SPADES
};
class Card
{
private:
char rank; // use digit (e.g., 4) for cards valued 2 through 9, 'T' for 10,
// 'J','Q','K','A' for Jack, Queen, King, and Ace
Suit suit;
public:
Card(); // creates Ace of Spades as default card
Card(char,Suit); // creates card with given rank and suit
char getRank() const;
Suit getSuit() const;
void setRank(char);
void setSuit(Suit);
string toString() const; // creates text representation of card, e.g. "2C" for 2
// of Clubs, "KH" for King of Hearts, etc.
};
2. class CardDeck
{
private:
Card* deck;
Card* next_card; // keeps track of where we are in a deck after dealing some cards
//(initially, next_card == deck)
public:
CardDeck(); // sets member variable deck to be an array of 52 Card objects
// representing deck of cards
~CardDeck();
void shuffle(); // randomly shuffles the deck (you will need to think about how
// to do this). also, this function should reset next_card =
//deck
Card* dealHand(int); // deals a hand of N cards where N is the input to the
// function. this function should also increment the
// next_card pointer by N cards.
};
#endif
Solution
card.h
#ifndef CARD_H
#define CARD_H
#include
const int SUIT_MAX(4);
const int RANK_MAX(13);
class Card
{
friend class Deck; // Deck Class needs to access to Card Class but not vice versa
public:
explicit Card();
explicit Card(const int &suit, const int &rank);
3. std::string Card2Str() const;
private:
int generate_suit();
int generate_rank();
int get_suit() const;
int get_rank() const;
int m_suit;
int m_rank;
};
#endif
card.cpp
#include /* srand, rand */
#include "card.h"
#include
const std::string SUIT[SUIT_MAX] = {"S", "H", "D", "C"};
const std::string RANK[RANK_MAX] =
{"2","3","4","5","6","7","8","9","10","J","Q","K","A"};
Card::Card()
{
m_suit = generate_suit();
m_rank = generate_rank();
}
Card::Card(const int &suit, const int &rank) : m_suit(suit), m_rank(rank)
{
}
int Card::generate_suit()
{