8. If The StrAddress Variable Contains The String “123 Maple Street”, What Will The
8. If the strAddress variable contains the string “123 Maple Street”, what will the strAddress.IndexOf(“Maple”) method return? a. –1 b. 4 c. 5 d. True
Please Use C Language To Edit The Code Below To Reache The Requst .
Please use C language to edit the code below to reache the requst . Here is the code for reference: #include #include #include struct node { int key; char name[32]; struct node* left; struct node* right; }; typedef struct node NodeType; void PreOrder(NodeType *tree) { if (tree != NULL) { printf(“Key: %d, %sn”, tree->key, tree->name); PreOrder(tree->left); PreOrder(tree->right); } } NodeType* Retrieve(NodeType* tree, int key) { if (tree == NULL) return NULL; else if (key key) return Retrieve(tree->left, key); else if (key > tree->key) return Retrieve(tree->right, key); else return tree; } NodeType *Insert(NodeType *tree, int key, char *name) { if (!tree) { tree = (NodeType *) malloc(sizeof (NodeType)); tree->left = tree->right = NULL; tree->key = key; strcpy(tree->name, name); } else if (key key) { tree->left = Insert(tree->left, key, name); } else if (key > tree->key) { tree->right = Insert(tree->right, key, name); } else printf(“Key is already in tree.n”); return tree; } Please see attached file regarding the request.
Consider The Relation R = {A, B, C, D, E, F, G, H, I,
Consider the relation R = {A, B, C, D, E, F, G, H, I, J, K} and the set of functional dependencies S = { {A, B} -> {C}, {B, D} -> {E, F}, {A, D} -> {G, H}, {B} -> {I}, {G} -> {J} , {F} -> {K} }. What is the key of R? Decompose R into 2NF relations: Further decompose the 2NF relations into 3NF relations: check whether the 3NF relations you obtained are in BCNF or not. Please give seperate and correct answers for all this questions.
Put True Or False For All Questions 1. If A Relation Schema Is In
Put true or false for all questions 1. If a relation schema is in 3nf, it is in BCNF. 2. Foreign key values can be null. 3. In a table there is exactly one candidate key, but there can be multiple super keys. 4. Any candidate key is a super key. 5. The primary key of a relation may have more than one attribute. However, a foreign key of a relation must have only one attribute. 6. Given relation R1, where R1 contains N1 tuples and a is an attribute of R1, the minimum possible size in tuples of σa=5(R1) 7. Every relation in an ER diagram must translate to an individual relation in the resulting relational database schema. 8. For any SQL query, there exist a unique translation into relational algebra. 9. IF a relation schema is in 3NF, it is in BCNF. 10. When designing a database , we should eliminate all redundant information among relations so that no two relations have common attributes to save storage cost.
Create A Project Consisting Of Three Classes. These Three Classes Are Named ProgTwo.java, Product.java
Create a project consisting of three classes. These three classes are named ProgTwo.java, Product.java and ProductCollection.java. This assignment requires you to implement at least three classes. The first class, Product, models a basic Product object for record keeping of the product’s data on a daily basis. The second class ProductCollection, implements methods for storing and maintaining a single dimension array of Product objects. The third class ProgTwo has a main method which creates and manipulates Product objects and stores/retrieves the Products from an array structure. Your program must be developed following the guidelines previously discussed in class. These guidelines include appropriate variable names, use of comments to describe the purpose of the program and the purpose of each method, and proper use of indentation of all program statements. Product.java details: One Constructor Constructor #1. It will take all the parameters as listed: int idNum String name double price int quantity Instance variables for the Product class int idNum String name double price int quantity Methods that must be part of the Product class (you may and probably will add other methods): Method Functionality public int getID() Returns the Product’s ID number. public void setID(int sID) Updates the Product’s ID number. public String getName( ) Returns the Product’s name. public void setName(String sName) Updates the Product’s name. public double getPrice( ) Returns the Product’s price. public void setPrice(double newPrice) Updates the Product’s price. public int getQuantity( ) Returns the quantity in inventory. public void setQuantity(int newQuantity ) Updates the quantity in inventory. public String toString( ) Returns a printable version of the Product Object. ProductCollection.java details: One Constructor which has no parameters. Instance variables for the ProductCollection class Product[] collection int count Methods that must be part of the ProductCollection class (you may add other methods): Method Functionality public void addProduct(int prodID, String prodName, double unitPrice, int prodQty) Checks to determine if there is enough room in the array for a new product – if not calls the increaseSize method. Activates the constructor of the Product class to put the new product object in the next compartment of the array. Increments the count variable to maintain an active count of products in the array. public void increaseSize() Creates a new array which is twice as big as the current array. Copies elements from the current array into the new array. Sets collection to point to the new array. public int indexOf(int prodID) Returns the index into the collection array where the product ID was found. Returns -1 if the product is not in the array. public void changePrice(int prodID, double newPrice) Changes the price of the product in the array having the id number “prodID” to “newPrice.” public void buyProduct(int prodID, int qty) Changes the quantity of the product in the array having the id number “prodID” by adding “qty” to it. public void sellProduct(int prodID, int qty) Changes the quantity of the product in the array having the id number “prodID” by subtracting “qty” from it. Public void deleteProduct(int prodID) Removes the product from the array, by shifting all products below it up one compartment and subtracting one from the variable named, count. public void displayProduct(int prodID) Displays the product have the id number “prodID”. public String createOutputFile() Creates an output file in the same format as the input text file. Each line contains data about one product in the array with each field being separated by a comma. The line is in the form: ID,Name,Price,Quantity, public String toString() Creates a nicely formatted heading for a report of products and activates the toString method of the Product class to add information about each product to one line of the report. ProgTwo.java technical specifications: ProgTwo should manage a array of product objects. Initial data about products is available in a text file named product.txt. This should be read into the array of products. The product.txt file is delimited by commas. After the array is created a loop is entered. The loop should display a menu which has the following options, obtain the number of the type of transaction from the user, and process the transaction. The loop should continue to execute until the “8” Exit option is selected from the menu. When the exit option is selected, the program should write out to a text file information about all the products in the array in the same format as the input file. The name of the output text file should be productUpdate.txt. 1. Add Product Prompt the user to enter the data required for a new product and add the product into the array of products. 2. Delete Product Have the user enter the product ID. If the product exists, prompt the user to confirm that they want the product to be deleted. If so, delete the product by moving all of the products below it in the array up one compartment and subtract one from count. Display an informative message to the user regarding the action taken. 3. Change Price Have the user enter the product ID and the new price of the product. Change the price of the product in the array if it exists, otherwise display an informative message to the user that the product does not exist. 4. Purchase Product Units Have the user enter the product ID and quantity of the product purchased. Adjust the quantity to reflect the purchase of products. Display a message for the user if the product does not exist in the array. 5. Sell Product Units Have the user enter the product ID and quantity of the product to be sold. Adjust the quantity to reflect the sale of products. Display a message for the user if the product does not exist in the array. 6. Display information about an individual product Have the user enter the ID number of the product to be displayed. Display the information if the product exists, otherwise display an information message. 7. Display information about all the products List all the products in inventory by using the toString( ) method. 8. Exit This will end the program execution.
Create A Project Consisting Of Four Classes. These Four Classes Will Be ProgThree.java, Animal.java,
Create a project consisting of four classes. These four classes will be ProgThree.java, Animal.java, Pet.java, and ZooAnimal.java. You must have these four classes and they must work as it is described in these specifications. You may add other classes and methods if you consider them necessary. This assignment requires you to implement at least four classes. The first class, Animal, stores basic data about an animal. The second class Pet, stores additional data about an animal which is a pet. The third class ZooAnimal, stores additional data about an animal which is kept in a zoo. The fourth class ProgThree has a main method which reads data about animals, pets and zoo animals and creates a report about animals, pets and zoo animals. Your program must be developed following the guidelines previously discussed in class. These guidelines include appropriate variable names, use of comments to describe the purpose of the program and the purpose of each method, and proper use of indentation of all program statements. Animal.java technical details: One Constructor Constructor #1. It will take all the parameters as listed: int animalID. String animalType. double weight. Instance variables for the Animal class int animalID. String animalType. double weight. Method which must be part of the Animal class: A toString() method which displays information about an animal in the following format: ID: 1015 Type: Monkey Weight: 38.6 Pet.java technical details: One Constructor – the first three parameters are passed to the Animal class constructor in the first line of the Pet constructor by using the super reference. Constructor. It will take all the parameters as listed: int animalID. String animalType. double weight. String name; String owner: Instance variables for the Pet class String name; String owner: Method which must be part of the Pet class: A toString() method which displays information about an animal in the following format: ID: 5089 Type: Fish Weight: 0.2 Name: Sally Owner: Henry Santos Note: The toString() Method gets the first line of output from the Animal class toString method. Animal is a parent class of the Pet class. ZooAnimal.java technical details: One Constructor – the first three parameters are passed to the Animal class constructor in the first line of the ZooAnimal constructor by using the super reference. Constructor #1. It will take all the parameters as listed: int animalID. String animalType. double weight. int cageNumber. String trainer. Instance variables for the ZooAnimal class int cageNumber. String trainer. Method which must be part of the ZooAnimal class: A toString() method which displays information about an animal in the following format: ID: 8850 Type: Fish Weight: 0.2 Cage: 103 Trainer: Suzie Tran Note: The toString() Method gets the first line of output from the Animal class toString method. Animal is a parent class of the ZooAnimal class. ProgThree.java Specifications: ProgThree should read information about animals, pets and zoo animals. Initial data about pets is available in a text file named animal.txt. The program should read one line of input from the text file and process it independently. The program should continue until all lines of the input file have been processed. The input file will contain a single line of data about each animal, pet or zoo animal. There are several lines in the input file and the animals, pets and zoo animals are mixed together. A input line will either contain three or five pieces of data. An input line with three pieces of data is an animal, and those three pieces of data will be animal id, type and weight, in order. Pets and zoo animals have the same first three pieces of data and then two additional pieces of data. If the animal id is between 3,000 and 7,999 the input record is about a pet and the last two pieces of data are the pet’s name and the owner’s name, both strings. If the animal id is between 8,000 and 9,999 the input record is about a zoo animal and the last two pieces of data are the cage number, an integer and the trainer’s name, a string. The rules for valid input records, follow: The first piece of data is animalID. It must be a four digit positive integer. Records whose ID numbers are between 3,000 and 7,999 should contain data about a “pet”. Records whose ID numbers are between 8,000 and 9,999 should contain data about a “zoo animal.” Records whose ID numbers are between 1,000 and 2,999 should contain data about an “animal.” Records whose ID numbers are less than 1,000 or greater than 9,999 should be considered to be invalid records. animalType must be a string of at least three characters. weight must be a valid positive real number. For “Pet” objects, name and owner each must be strings of at least three characters. For “Zoo Animal” objects, cageNumber must be a positive integer and trainer must be a string of at least three characters. You may assume that input records will contain data of the data types needed by the program. For example, for input records of animals the record will contain an int, String and double in that order. You may not assume, however, that the input records will contain valid data. For example, the weight will be a real number (data type matches) but it may be negative making the input record invalid. In another input record, the animalType is a string but only contains two characters, making it an invalid record. After reading in the data, determine if the data contained in the record is valid. If so, construct the appropriate type of object and write the object’s data to the output file, “animalout.txt”. If not, ignore the input record and proceed to the next record. When all of the animals have been processed, write to the output the total number of each, animals, pets and zoo animals written to the output file. Close the output file and end the program. You will need to use skills learned in modules two through seven and ten to complete this program.
Timestamp 7/20/2019 10:00:29 7/20/2019 10:01:06 7/20/2019 10:01:23 7/20/2019 10:01:24 7/20/2019 10:02:16 7/20/2019 10:02:20 7/20/2019
Help needed reated elxcel ! Thanx I am unable to change this timestamp format ! Please help
Please Help Create A Scenario In Which You Would Use The ACM Code ACM
please help Create a scenario in which you would use the ACM Code ACM Code of Ethics and Professional Conduct Then, in detail, analyze and enumerate the relevant portions of the ACM Code to your scenario. For example, from my scenario above I would look at section 1.2 – Avoid Harm to Others, analyzing how looking at personal information would be of harm. Finally, apply the code to your scenario. For example, telling the co-worker if he/she doesn’t self report I would have to report this and here’s why the ACM Code leads me to take this action.
Which Of The Following Displays The Number Of Elements Contained In The IntItems
Which of the following displays the number of elements contained in the intItems array? a. lblCount.Text = intItems.Len b. lblCount.Text = intItems.Length c. lblCount.Text = Length(intItems) d. lblCount.Text = intItems.NumElements
Write An HTML 5 Document That Advertises A Business That You Own Or
Write an HTML 5 document that advertises a business that you own or want to start. The document must include at least one heading and two paragraphs.
Write An HTML 5 Document That Contains Two Text Fields, A Button, And
Write an HTML 5 document that contains two text fields, a button, and a div in that order. The text fields and the div must each have a unique id attribute. Put any text that you want on the button and inside the div.
MATLAB Question. Please Help!!! Thanks Question: Create A Function That Determines The X And
MATLAB question. Please help!!! thanks Question: Create a function that determines the x and y position of an arrow given initial conditions and a time vector are provided as inputs
MATLAB Question Question: Create A Function That Plots The Position Of An Arrow In
MATLAB question Question: Create a function that plots the position of an arrow in the x-y plane given initial conditions and a time vector are provided as inputs. The plot should have axis labels and a title.
MATLAB Question Question: Create A Function That Can Determine Range (landing Distance) Of An
MATLAB question Question: Create a function that can determine range (landing distance) of an arrow, given initial conditions are provided as inputs. Assume the ground is at y = 0.
MATLAB Question Question: Create A Function That Determines The Magnitude And Direction (in Degrees)
MATLAB Question Question: Create a function that determines the magnitude and direction (in degrees) of velocity of an arrow given initial conditions and a time vector are provided as inputs.
MATLAB Question Question: Create A Function That Determines The Total Cost Of The Order,
MATLAB question Question: Create a function that determines the total cost of the order, given the number of motors is provided as an input.
MATLAB Question Question: Create A Function That Determines The Maximum Number Of Motors A
MATLAB Question Question: Create a function that determines the maximum number of motors a customer can purchase given their budget is provided as an input (Hint: you can use the floor function to round a number down).
1. Which Of The Following Changes The String Stored In The StrName Variable From
1. Which of the following changes the string stored in the strName variable from “Mark Smyth” to “Mark Smith”? a. strName = strName.Change(“y”, “i”) b. strName = strName.Remove(7, 1) strName = strName.Insert(7, “i”) c. strName = strName.Remove(7) strName = strName.Insert(7, “i”) d. both b and c
Which Of The Following Expressions Evaluates To True When The StrPart Variable Contains The
Which of the following expressions evaluates to True when the strPart variable contains the string “12AX45”? a. strPart Like “99[A-Z][A-Z]99” b. strPart Like “######” c. strPart Like “##[A-Z][A-Z]##” d. none of the above
5. If The StrName Variable Contains The String “Tony Harris”, Which Of The Following
5. If the strName variable contains the string “Tony Harris”, which of the following changes the contents of the variable to “Tony J. Harris”? a. strName = strName.Insert(” “, ” J. “) b. strName = strName.Insert(5, “J. “) c. strName = strName.Insert(4, ” J.”) d. both b and c
6. Which Of The Following Changes The Contents Of The StrWord Variable From “trees”
6. Which of the following changes the contents of the strWord variable from “trees” to “tree”? a. strWord = strWord.Trim(4) b. strWord = strWord.Trim(5) c. strWord = strWord.Remove(4) d. strWord = strWord.Remove(5, 1)
The post 8. If The StrAddress Variable Contains The String “123 Maple Street”, What Will The appeared first on Smashing Essays.
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
