Loading
Home › Computer Science Help › Module 1: 1. The price of an item you want to buy is give...
Status: Completed

Module 1: 1. The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c cents. Write specications for a function that computes the change, if any, that you should receive. Include a statement of purpose, the preconditions and postconditions, and a description of the arguments. 2. A date consists of a month, day, and year. Consider the class Date of such dates. Suppose that Date represents the month, day, and year as integers. For example, July 4, 1776, is month 7, day 4, and year 1776. a. Write specications for a method within Date that advances any given date by one day. Include a statement of purpose, the preconditions and postconditions, a description of the arguments, and a description of any return value. b. Write a C++ implementation of this method. Design and specify any other method that you need. Include comments that will be helpful to someone who will maintain your implementation in the future. 4.Imagine that you have just left a store with a bag of groceries. You are concerned that the fragile items will not survive the trip home, so when you reach your car, you place those items into their own bag. If Bag is a class of bags, write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag. When you are done, storeBag should be empty. Assume that grocery items are represented by strings. 5. Suppose that a bag contains strings that represent various grocery items. Write a C++ function that removes and counts all occurrences of a given string from such a bag. Your function should return this number. Use comments in javadoc style to fully specify your function. Accommodate the possibility that the given bag is either empty or does not contain any occurrences of the given string.

Date Posted: 28/02/2014
Category: Computer Science
Due Date: 14/03/2014
Instruction
Module 1: 1. The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c cents. Write specications for a function that computes the change, if any, that you should receive. Include a statement of purpose, the preconditions and postconditions, and a description of the arguments. 2. A date consists of a month, day, and year. Consider the class Date of such dates. Suppose that Date represents the month, day, and year as integers. For example, July 4, 1776, is month 7, day 4, and year 1776. a. Write specications for a method within Date that advances any given date by one day. Include a statement of purpose, the preconditions and postconditions, a description of the arguments, and a description of any return value. b. Write a C++ implementation of this method. Design and specify any other method that you need. Include comments that will be helpful to someone who will maintain your implementation in the future. 4.Imagine that you have just left a store with a bag of groceries. You are concerned that the fragile items will not survive the trip home, so when you reach your car, you place those items into their own bag. If Bag is a class of bags, write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag. When you are done, storeBag should be empty. Assume that grocery items are represented by strings. 5. Suppose that a bag contains strings that represent various grocery items. Write a C++ function that removes and counts all occurrences of a given string from such a bag. Your function should return this number. Use comments in javadoc style to fully specify your function. Accommodate the possibility that the given bag is either empty or does not contain any occurrences of the given string.
Bidders
surrogatetutor 12 years, 7 months ago
Rated 8.21 earned 1930.00 around 90 assignments.
hello, kindly trust me with this assignment and i guarantee you a top grade. i promise to deliver quality work free of plagiarism and on time so please just give me the go ahead and all the details so that i can begin working on it . i assure you i will do this to the best of my ability.
$30.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
mikwai 12 years, 7 months ago
Rated 9.13 earned 8389.00 around 281 assignments.
hello, kindly selcet my bid. i guarantee a high quality paper. Thank you
$40.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
gudwriter 12 years, 7 months ago
Rated 8.31 earned 5136.36 around 195 assignments.
Kindly assign me this work and i guarantee you a high quality well researched work delivered on time with a guarantee of scoring to grade which i know you deserve. I am committed to producing that grade that will leave you all smiles and you will always want to work with me. patiently waiting for you to assign me this one so that i can do a good job for you. Trust me with this and you will never regret.
$30.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
agreen12 12 years, 9 months ago
Rated 8.57 earned 1447.00 around 20 assignments.
i will do this assignment
$50.00
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}
 
 
Expertresearcher 12 years, 9 months ago
Rated 7.33 earned 452.00 around 29 assignments.
Hi please assign me this homework and you can be sure of timely submission of your work
$15.00
  • HI Hope you are well please assign to me this quiz I assure you of thorough work and submission in time, i .e this is my area of expertise. Thanks for letting me be the one to work for you
    User_3976 | Jun 26, 2015, 02:15 AM
  • {$ item.message_content $}
    {$ item.sender_username $} | {$ item.date_entered $}