Input File Default Value
Is there a way to put default value to browse file html tag ?
for example putting value=”c:test.doc”
Is there a way to put default value to browse file html tag ?
for example putting value=”c:test.doc”
You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:
1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.
For example, if the user adds these items:
a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95
Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.
The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.
If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.
If the choice is 2, it will be followed by the name of the item to be deleted.
Choice 3 will be on a line by itself.
Choice 4 will be followed by a single string storing an item.
Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.
For choice 1, if the item to be added is NOT in the tree, output a line with the following format:
item has been added to the stock.
where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:
Sorry, item is already in stock. No changes made.
For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:
item has been deleted from the stock.
If the item is NOT in the tree, then output a line with the following format:
Sorry, item couldn’t be deleted because it’s not in stock.
For choice 3, the first line should read:
Here is a list of the items in stock:
Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:
item $price
The price should be printed out to two decimal places exactly.
Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.
The value of all the items underneath item is $price.
Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.
Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50
Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.
soap has been added to the stock.
raisins has been added to the stock.
jellybeans has been added to the stock.
tea has been added to the stock.
The value of all the items underneath raisins is $7.00.
Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95
raisins has been deleted from the stock.
The value of all the items underneath soap is $9.90.
The value of all the items underneath cereal is $0.00.
Sorry, soap is already in stock. No changes made.
CAN I HAVE BEFOR AUGUST 15,2009
THANKS
(Need by Friday 10pm if possible)
The Problem
You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:
1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.
For example, if the user adds these items:
a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95
in this order, then the structure of the binary tree would be as follows:
soap 2.95
total: 11.90
/
raisins 2.00 tea 1.95
total: 7.00 total 1.95
/
jellybeans 5.00
total: 5.00
Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.
The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.
If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.
If the choice is 2, it will be followed by the name of the item to be deleted.
Choice 3 will be on a line by itself.
Choice 4 will be followed by a single string storing an item.
Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.
For choice 1, if the item to be added is NOT in the tree, output a line with the following format:
item has been added to the stock.
where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:
Sorry, item is already in stock. No changes made.
For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:
item has been deleted from the stock.
If the item is NOT in the tree, then output a line with the following format:
Sorry, item couldn’t be deleted because it’s not in stock.
For choice 3, the first line should read:
Here is a list of the items in stock:
Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:
item $price
The price should be printed out to two decimal places exactly.
Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.
The value of all the items underneath item is $price.
Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.
Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50
Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.
soap has been added to the stock.
raisins has been added to the stock.
jellybeans has been added to the stock.
tea has been added to the stock.
The value of all the items underneath raisins is $7.00.
Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95
raisins has been deleted from the stock.
The value of all the items underneath soap is $9.90.
The value of all the items underneath cereal is $0.00.
Sorry, soap is already in stock. No changes made.
The Problem
It’s the first day of class and you are barely awake. You are hoping to snooze through a typical syllabus day when your new teacher commands you to get up and find the person in the room with the closest birthday to yours. Luckily, you’ve taken AP Computer Science already and realize that the key to solving the problem is to sort EVERYONE by their birthday, and then simply look directly to the left and right of you (the birthday that occurs immediately before and after yours) and see which of the two is closer. If you on the end of the list, you have to check with the person at the beginning and vice versa.
In order to solve this problem, you’ll get several different classes from an input file. Each class will have several queries. You are required to implement either Merge Sort of Quick Sort in the solution of your assignment.
Input File Specification (birthday.txt)
The input file has a single positive integer, n, on its first line, specifying the number of classes in the input file.
The first line of each input file will have a single positive integer k (k < 1001), representing the number of students in the class. The next k lines will have information about each student. Each line will have the following information separated by spaces: first name, last name, month, day and year of birth. All names will only contain uppercase alphabetic characters and be no longer than 29 characters long. The month will be represented in its full spelling, in uppercase letters. The day and year will be the appropriate integers. You are guaranteed that all of this information is valid. (Thus, no April 31st will appear, etc.) It is also guaranteed that each full name will be unique. (Namely, no two people in a class will have the exact same first AND last name.)
Following those k lines will be a line containing a single positive integer m (m < k), representing the number of queries for that class. The following m lines will contain the first and last name (separated by a space) of the student in question. (Your goal will be to find the name of the student with the closest birthday to the queried student.)
Output Specification
For each input class, print out a header with the following format:
Class #c:
where c represents the day of the simulation (1 ≤ c ≤ n).
Follow this with a blank line.
The following k lines will answer the queries for that class in the order they were given. For each of these queries, output a single line with the following format:
FIRST2 LAST2 has the closest birthday to FIRST LAST.
where FIRST LAST is the name of the queried student and FIRST2 LAST2 is the name of the student with the closest birthday to FIRST LAST.
To avoid ambiguity, sort the students in the following manner:
1) By birthdate, ignoring the year.
2) To break ties between students with the same exact birthdate, use last name as compared by the strcmp function.
3) To break ties where both #1 and #2 are the same, use the first name, which in these cases, is guaranteed to be different.
To further avoid ambiguity, if both the person who appears right before and right after the queried person are the same number of days away (in birthday) as the queried person, always choose the first who comes AFTER the queried person in the array. Note: for these purposes, February 29th won’t count as an actual day, unless someone in the class has that birthday. For example, if the queried person’s birthday is March 1st, the person right before her has a February 28th birthday and the person right after her as a March 3rd birthday, then the person with the February 28th birthday is considered the closest (1 day way) as compared to the March 3rd birthday (2 days away). BUT, if there IS a February 29th birthday in the class, then that does count as a day.
Put a blank line between the output for each case.
Implementation Restrictions
You must store all the relevant information about a student in an appropriate struct. You must implement either Merge Sort or Quick Sort. You must follow all the tie-breaking procedures described above.
Sample Input File
2
3
SAM MALONE MAY 3 1961
DIANE CHAMBERS AUGUST 16 1970
NORM PETERSON DECEMBER 12 1955
2
SAM MALONE
NORM PETERSON
4
DAN MARINO SEPTEMBER 15 1961
JOHN ELWAY JUNE 28 1960
JOE MONTANA JUNE 11 1956
DAN FOUTS JUNE 10 1951
1
JOE MONTANA
Sample Output
Class #1:
DIANE CHAMBERS has the closest birthday to SAM MALONE.
DIANE CHAMBERS has the closest birthday to NORM PETERSON.
Class #2:
DAN FOUTS has the closest birthday to JOE MONTANA.
Please write in C.
Project due to me by 6 p.m. EST US time on Jul-22-09.
You are to write a C program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:
1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.
For example, if the user adds these items:
a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95
Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.
The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.
If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.
If the choice is 2, it will be followed by the name of the item to be deleted.
Choice 3 will be on a line by itself.
Choice 4 will be followed by a single string storing an item.
Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.
For choice 1, if the item to be added is NOT in the tree, output a line with the following format:
item has been added to the stock.
where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:
Sorry, item is already in stock. No changes made.
For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:
item has been deleted from the stock.
If the item is NOT in the tree, then output a line with the following format:
Sorry, item couldn’t be deleted because it’s not in stock.
For choice 3, the first line should read:
Here is a list of the items in stock:
Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:
item $price
The price should be printed out to two decimal places exactly.
Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.
The value of all the items underneath item is $price.
Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.
Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50
Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.
soap has been added to the stock.
raisins has been added to the stock.
jellybeans has been added to the stock.
tea has been added to the stock.
The value of all the items underneath raisins is $7.00.
Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95
raisins has been deleted from the stock.
The value of all the items underneath soap is $9.90.
The value of all the items underneath cereal is $0.00.
Sorry, soap is already in stock. No changes made.
You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:
1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.
For example, if the user adds these items:
a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95
Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.
The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.
If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.
If the choice is 2, it will be followed by the name of the item to be deleted.
Choice 3 will be on a line by itself.
Choice 4 will be followed by a single string storing an item.
Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.
For choice 1, if the item to be added is NOT in the tree, output a line with the following format:
item has been added to the stock.
where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:
Sorry, item is already in stock. No changes made.
For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:
item has been deleted from the stock.
If the item is NOT in the tree, then output a line with the following format:
Sorry, item couldn’t be deleted because it’s not in stock.
For choice 3, the first line should read:
Here is a list of the items in stock:
Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:
item $price
The price should be printed out to two decimal places exactly.
Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.
The value of all the items underneath item is $price.
Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.
Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50
Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.
soap has been added to the stock.
raisins has been added to the stock.
jellybeans has been added to the stock.
tea has been added to the stock.
The value of all the items underneath raisins is $7.00.
Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95
raisins has been deleted from the stock.
The value of all the items underneath soap is $9.90.
The value of all the items underneath cereal is $0.00.
Sorry, soap is already in stock. No changes made.
You are to write a program that creates and maintains a binary search tree of items in a super market. Each item has a name and a value. All item names will be lowercase alphabetic strings of less than 30 letters. All values will be positive real numbers representing prices. Also, for each node in the tree, you are to maintain the value of all of the items in that subtree. Your tree should be “sorted” based on alphabetical ordering of the item names as determined by strcmp. Your program must allow the user to do the following:
1) Add an item to the inventory
2) Delete an item from the inventory
3) Print out all of the items in the inventory in alphabetical order.
4) Print out the value of all items underneath the subtree of a given item.
For example, if the user adds these items:
a) “soap”, $2.95
b) “raisins”, $2.00
c) “jellybeans”, $5.00
d) “tea”, $1.95
in this order, then the structure of the binary tree would be as follows:
soap 2.95
total: 11.90
/
raisins 2.00 tea 1.95
total: 7.00 total 1.95
/
jellybeans 5.00
total: 5.00
Input File Specification (inventory.txt)
The first line of the input file will contain a single positive integer, n, representing the number of commands to execute. The following n lines will contain one command each, in the other they are to be executed.
The first number of each of these lines will be either 1, 2, 3 or 4, to signify the choices listed above.
If the choice is 1, it will be followed by the name of the item added and its price (as a number), both separated by spaces.
If the choice is 2, it will be followed by the name of the item to be deleted.
Choice 3 will be on a line by itself.
Choice 4 will be followed by a single string storing an item.
Output Specification
For each command, your program should provide some output.
The output provided by each command should be separated by a blank line.
For choice 1, if the item to be added is NOT in the tree, output a line with the following format:
item has been added to the stock.
where item is the name of the item added. If the item is ALREADY in the tree, output a line with the following format:
Sorry, item is already in stock. No changes made.
For choice 2, if the item to be deleted is IN the tree and is successfully deleted, output a line with the following format:
item has been deleted from the stock.
If the item is NOT in the tree, then output a line with the following format:
Sorry, item couldn’t be deleted because it’s not in stock.
For choice 3, the first line should read:
Here is a list of the items in stock:
Each following line should have information about one item and the list should be in alphabetical order by item name. Here is the format for one of these lines:
item $price
The price should be printed out to two decimal places exactly.
Finally, for choice 4, print out the sum of the values of all the items in the subtree rooted by the designated item. If this item is NOT in the tree, $0.00 should be printed out. Here is the format for the output for this option.
The value of all the items underneath item is $price.
Implementation Restrictions
You must store the data in nodes of a binary tree. Each binary tree node must store 3 pieces of information: the name of the item, its price, and the sum of the prices of all the items in its subtree.
Sample Input File
11
2 soap
1 soap 2.95
1 raisins 2.00
1 jellybeans 5.00
1 tea 1.95
4 raisins
3
2 raisins
4 soap
4 cereal
1 soap 3.50
Sample Output
Sorry, soap couldn’t be deleted because it’s not in stock.
soap has been added to the stock.
raisins has been added to the stock.
jellybeans has been added to the stock.
tea has been added to the stock.
The value of all the items underneath raisins is $7.00.
Here is a list of the items in stock:
jellybeans $5.00
raisins $2.00
soap $2.95
tea $1.95
raisins has been deleted from the stock.
The value of all the items underneath soap is $9.90.
The value of all the items underneath cereal is $0.00.
Sorry, soap is already in stock. No changes made.
PS: I may not answer right away to you bids, so after you bid please allow some time for answer.
The Problem
A university lacks a credible grocery store on campus. After a year of getting lousy over-priced food in the convenience store in the Student Union, you and all of your friends are frustrated. One of your friends majoring in business comes up with the brilliant idea of opening a grocery store on campus. But, they need your help to decide if their idea is viable or not. Your job will be to run various simulations of customers in line.
The model for the store is as follows:
Normally, there will be three lines in operation or customers to buy their groceries. Each line will have a capacity of 8 customers. The first line (line A) will only be for customers with 10 or fewer items. The other two lines (line B and C) will be for all customers. When a customer is ready to check out, here is how they decide what line to go to:
If the customer has 10 or fewer items and the
We need a custom script written, that can merge select data, from one spreadsheet to another, and overwrite specified cells. The input spreadsheet will include all of the cell changes needed, for each column, with each row representing one product. So, if product sku 567B needs the “title value” column changed to “Blue Widget”, from “Red Widget”, then the cell will be overwritten with the correct change, without overwriting other cells. Blank cells, in the input file, need to be ignored during the overwrite to the master spreadsheet. Attached are two sample files, along with a sample output file. One file is the input file for overwriting the changes, and another is the master file example needing the update. The 3rd file is a sample of what the output file should look like after the merge. The merge script needs to run within a local drive directory, after adding the two input files along with the .exe file. The two input files will be like the two sample files provided. One is the changes input file, and the other is the master spreadsheet file that needs the changes copied to. After running the script, a final output excel file, containing the merged data, will appear in the same directory.
Objective
To give students practice at writing a program using strings.
The Problem
Many people, after a late night, for whatever reason, tend to send emails or text messages that they shouldn
Restrictions — MUST be in plain old C — NOT C++ and compile with DevC++ compiler as a .c file — Need an input dictionary file with at least 30,000 words to validate spelling.
The Problem
Many people, after a late night, for whatever reason, tend to send emails or text messages that they shouldn
Restrictions — MUST be in plain old C — NOT C++ and compile with DevC++ compiler as a .c file — Need an input dictionary file with at least 30,000 words to validate spelling.
The Problem
Many people, after a late night, for whatever reason, tend to send emails or text messages that they shouldn
Objective
To give students practice at writing a program using strings.
The Problem
Many people, after a late night, for whatever reason, tend to send emails or text messages that they shouldn