Cis242 homework | Computer Science homework help

  • Write the code for each lab assignment.
  • Submit the lab in a single zip file in the online course shell. The lab must contain all .cpp files, along with any additional files that may be necessary for your project to run (ex: text files).
  • Enter any and all written answers into the online course shell along with the submission of the attached lab assignment.

Please submit each lab assignment with only two files for grading.

.cpp file of your C++ program design (source code)

.docx file of its program’s successful execution output in Word format.

 

Each lab assignment will be graded based on the following: 

1. The program must compile, execute, produce correct results, and meet all of the specifications in the weekly lab.

Additionally you must: 

2. Organize the code for user readability.

3. Organize the code for reusability.

4. Provide documentation with embedded comments for reader understanding.

5. Organize the code for efficiency.

 

Homework 1: 

 

During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors.

 

Find and correct the logic errors so that the program works properly.

 

//Logic errors.

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

double cost;

double area;

 

double bagSize;

cout << fixed << showpoint << setprecision(2);

cout << “Enter the amount of fertilizer, in pounds, “

          << “in one bag: “;

cin >> bagSize;

cout << endl;

 

cout << “Enter the cost of the ” << bagSize

          << ” pound fertilizer bag: “;

cin >> cost;

cout << endl;

 

cout << “Enter the area, in square feet, that can be “

       << “fertilized by ne bag: “;

cin >> area;

cout << endl;

 

cout << “The cost of the fertilizer per pound is: $”

         << bagSize / cost << endl;

cout << “The cost of fertilizing per square foot is: $”

         << area / cost << endl;

 

Return 0;

 

}

 

Homework 2:

 

Linda is starting a new cosmetic and clothing business and would like to make a net profit of approximately 10% after paying all the expenses, which include merchandise cost, store rent, employees’ salary, and electricity cost for the store. She would like to know how much the merchandise should be marked up so that after paying all the expenses at the end of the year she gets approximately 10% net profit on the merchandise cost. Note that after marking up the price of an item she would like to put the item on 15% sale. Write a program that prompts Linda to enter the total cost of the merchandise, the salary of the employees (including her own salary), the yearly rent, and the estimated electricity cost. The program then outputs how much the merchandise should be marked up so that Linda gets the desired profit.

 







Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 10% with the coupon code: best10