USE C++
Declare a Song struct to store the data for a single song (make it a private member), and you must have anarray of Song structures as a member variable.
Player(string name, float size) a constructor
for the class. ’name' is a name for it
'size' is a maximum capacity in Mb.
addSong(string band, string title, string length, float size) a function for adding a new song.
'band' is a name of the band
'title' is a name of the song
'length' is a time length of that song in a '1:23' format (“mm:ss")
'size' is a size of the song in Mb
Return true if the song was added and false if there was not enough space (memory) for it or there was a song with the same band and title already in that device or if the device already has 1000 songs in it.
In: Computer Science
List THREE communication techniques with children.
2. Name FOUR habits to explore during health interview.
3. List FOUR clinical manifestations of failure to thrive.
4. List FOUR guidelines for assessing toilet training readiness.
5. What are the warning signs of Abuse. Name FOUR warning signs.
6. Name THREE characteristics of attention deficit hyperactivity disorder.
7. List FOUR recommended behaviors for preventing obesity.
8. Name TWO guidelines for assessing coping behaviors and give TWO examples of each coping behavior.
9. List TWO clinical manifestations of hearing impairment in Infants and TWO in Children.
10. Name FOUR bill of rights for children and teens in the hospital.
In: Nursing
List THREE communication techniques with children.
2. Name FOUR habits to explore during health interview.
3. List FOUR clinical manifestations of failure to thrive.
4. List FOUR guidelines for assessing toilet training readiness.
5. What are the warning signs of Abuse. Name FOUR warning signs.
6. Name THREE characteristics of attention deficit hyperactivity disorder.
7. List FOUR recommended behaviors for preventing obesity.
8. Name TWO guidelines for assessing coping behaviors and give TWO examples of each coping behavior.
9. List TWO clinical manifestations of hearing impairment in Infants and TWO in Children.
10. Name FOUR bill of rights for children and teens in the hospital.
In: Nursing
9) This is in Python
Code a program that allows the user to manage its expenses accepting the following commands:
- Add <player_name> -> This command adds a new player to the system. Assume there can’t be repeated names. If a name already exists then an error is shown to the user.
- Score <player_name> <score> -> This command adds the score to the player with the name player-name. Each score needs to be added individually
- Report -> This commands prints the name of each player and the top three scores they have. If they have less than three scores then it prints all of the scores for that player. After printing each name and the top three scores for each player it prints the total score for all players
-Exit -> Stops the program
In: Computer Science
/**
* This class implements a basic Binary Search Tree that supports
insert and get operations. In
* addition, the implementation supports traversing the tree in
pre-, post-, and in-order. Each node
* of the tree stores a key, value pair.
*
* @param <K> The key type for this tree. Instances of this
type are used to look up key, value
* pairs in the tree.
* @param <V> The value type for this tree. An instance of
this type is stored in every node, along
* with a key.
*/
public class BST<K extends Comparable<K>, V> {
/**
* Interface for
*
* @param <K> the key type that the traverser works with
* @param <V> the value type that the traverser works
with
*/
public interface Traverser<K, V> {
/**
* Method that is called for every visited node.
*
* @param key the key stored in the visited node
* @param value the value stored in the visited node
*/
public void visit(K key, V value);
}
/**
* A tree traverser that prints all values stored in the visited
nodes.
*/
private static class IntegerValuePrintTraverser implements
Traverser<Integer, Integer> {
/**
* This method is called for every visited node, printing the value
stored in the node.
*/
public void visit(Integer key, Integer value) {
System.out.println(value);
}
}
/**
* Nested node class for the tree. Stores a key, value pair and has
references to left and right
* child.
*/
private class Node {
public K key = null;
public V value = null;
public Node left = null;
public Node right = null;
/**
* Construct a tree node for a give key, value pair.
*
* @param key The key stored in the node. This determines where in
the tree the node will be
* inserted.
* @param value The value stored in the node alongside the
key.
*/
public Node(K key, V value) {
this.key = key;
this.value = value;
}
}
// the root node reference for the tree; is null is tree is
empty
private Node root = null;
// number of nodes stored in the tree
private int size;
/**
* Insert a new key, value pair into the tree.
*
* @param key
* @param value
* @throws IllegalArgumentException if key is null or if key is
already present in tree
*/
public void insert(K key, V value) {
if (key == null) {
throw new IllegalArgumentException("null key not allowed");
}
this.root = this.insertRecursive(this.root, key, value);
this.size++;
}
/**
* Recursive helper method for the public insert method. Recursively
traverses the tree and find
* the spot to insert given key.
*
* @param node node that is currently visited
* @param key the key to insert
* @param value the value to insert
* @return return the node that is visits to (re-)attach it to the
tree
*/
private Node insertRecursive(Node node, K key, V value) {
if (node == null) {
return new Node(key, value);
} else if (node.key.equals(key)) {
throw new IllegalArgumentException("no duplicate keys
allowed");
} else if (node.key.compareTo(key) < 0) {
// new key is larger than current key
node.right = insertRecursive(node.right, key, value);
return node;
} else {
// new key is smaller then current key
node.left = insertRecursive(node.left, key, value);
return node;
}
}
/**
* Retrieve value that is stored for given key in the tree.
*
* @param key the key to look for in the tree
* @throws IllegalArgumentException if key is null
* @return value for key or null if key does not exist in tree
*/
public V get(K key) {
if (key == null) {
throw new IllegalArgumentException("null key not allowed");
}
Node n = getNodeForKey(this.root, key);
if (n == null)
return null;
return n.value;
}
/**
* Recursive helper method for the public insert method. Recursively
traverses the tree and find
* the spot to insert given key.
*
* @param node node that is currently visited
* @param key the key to insert
* @param value the value to insert
* @return return the node that is visits to (re-)attach it to the
tree
*/
private Node getNodeForKey(Node n, K key) {
if (n == null) {
return null;
} else if (n.key.equals(key)) {
return n;
} else if (n.key.compareTo(key) < 0) {
return getNodeForKey(n.right, key);
} else {
return getNodeForKey(n.left, key);
}
}
/**
* Starts a postorder traversal of the tree.
*
* @param t the traverser to do the traversal with
*/
public void postOrderTraversal(Traverser<K, V> t) {
this.postOrderTraversal(this.root, t);
}
/**
* Helper method that traverses the tree recursively in postorder
and calls the traverser for
* every node.
*
* @param n the node that is currently visited
* @param t the traverser to do the traversal with
*/
private void postOrderTraversal(Node n, Traverser<K, V> t)
{
if (n != null) {
postOrderTraversal(n.left, t);
postOrderTraversal(n.right, t);
t.visit(n.key, n.value);
}
}
/**
* Starts a preorder traversal of the tree.
*
* @param t the traverser to do the traversal with
*/
public void preOrderTraversal(Traverser<K, V> t) {
this.preOrderTraversal(this.root, t);
}
/**
* Helper method that traverses the tree recursively in preorder and
calls the traverser for every
* node.
*
* @param n the node that is currently visited
* @param t the traverser to do the traversal with
*/
private void preOrderTraversal(Node n, Traverser<K, V> t)
{
if (n != null) {
t.visit(n.key, n.value);
preOrderTraversal(n.left, t);
preOrderTraversal(n.right, t);
}
}
/**
* Starts an inorder traversal of the tree.
*
* @param t the traverser to do the traversal with
*/
public void inOrderTraversal(Traverser<K, V> t) {
this.inOrderTraversal(this.root, t);
}
/**
* Helper method that traverses the tree recursively in inorder and
calls the traverser for every
* node.
*
* @param n the node that is currently visited
* @param t the traverser to do the traversal with
*/
private void inOrderTraversal(Node n, Traverser<K, V> t)
{
if (n != null) {
inOrderTraversal(n.left, t);
t.visit(n.key, n.value);
inOrderTraversal(n.right, t);
}
}
/**
* Main method with a demo for the tree traverser.
*
* @param args the command line arguments passed when running the
program
*/
public static void main(String args[]) {
BST<Integer, Integer> bst = new BST<Integer,
Integer>();
// map keys to their squares (values)
bst.insert(7, 49);
bst.insert(2, 4);
bst.insert(10, 100);
bst.insert(1, 1);
bst.insert(8, 64);
System.out.println("pre order traversal:");
bst.preOrderTraversal(new IntegerValuePrintTraverser());
System.out.println("in order traversal:");
// TODO: replace this in order traversal's
IntegerValuePrintTraverser object with
// the object of an anonymous class that only prints the keys (not
the values)
// in the visited nodes
bst.inOrderTraversal(new IntegerValuePrintTraverser());
System.out.println("post order traversal:");
// TODO: replace this post order traversal's
IntegerValuePrintTraverser object with
// the object of a lambda expression that prints both the key and
value in the
// visited nodes
bst.postOrderTraversal(new IntegerValuePrintTraverser());
}
}
In: Computer Science
In: Economics
you must research Medicare Fraud on the internet, locate three trustworthy sources, write up three summary tables (one for each source) then post your summary tables to the discussion.
Note: You should not repeatedly use the same source or type of source (e.g., government web site). Rather you should utilize multiple sources. Additionally, dictionaries, although credible, should not be used as sources for this activity.
Article 1
|
Title of Article: Author: Publication/source: URL: Date published: Date accessed: |
|
I think this resource is credible because: |
|
Summary of article (2-3 paragraphs). Do NOT cut and paste material from article. You must summarize the article in your own words: |
In: Nursing
Economics is the study of how societies, governments, businesses, households, and individuals allocate their scarce resources. Our discipline has two important features. First, we develop conceptual models of behavior to predict responses to changes in policy and market conditions. Second, we use rigorous statistical analysis to investigate these changes.
To understand better the economy, choose any economic article from an online business sourcesuch as newspaper, magazine, TV, and so on. Read the article very carefully and write a summary to explain:
Required ( In your own words and - Computerized ( In Word Format)
In: Economics
During the American Revolution, the revolutionary organization that exchanged information throughout the colonial resistance was
a. Sons of Liberty
b.The Loyalists
C. Committee of Correspondence
d.Articles of Confederation
e.The League of Resistance
During the American Revolution, the Loyalists were supporters of
a.Virginia
b.The colonial resistance
c.Great Britain
d.France
e.South Carolina backcountry farmers
The person most associated with the “Bill for Establishing Religious Freedom,” that was adopted in 1786 after much controversy, was:
a.Thomas Jefferson
b.Adam Smith
c.Benjamin Rush
D. James Otis
E. John Adams
Thoughts on Government (1776) was an influential publication calling for “balanced governments” in the new United States. The Massachusetts author of this important work was
a.Thomas Jefferson
b.Adam Smith
c.Benjamin Rush
d.James Otis
In: Psychology
State if the given statements are true or false by writing your answers (T for ``true’’ and F for ``false’’) in the last column of the following table.
|
(1) |
Some Internet-based companies store lot of information about Internet users, raising privacy concerns. |
|
|
(2) |
There is a concern that online disseminators of content are not fairly compensating the creators of the content, like an author, a stunt performer, an athlete, an educator, and an artist. |
|
|
(3) |
The world’s top five most-valued companies are all car-manufacturing companies. |
|
|
(4) |
There is no company in the area of computing whose market value has been above one trillion US dollars for many years. |
|
|
(5) |
There is a manufacturing company whose market value exceeds one trillion US dollars. |
In: Computer Science