Assignment 1 Expository Essay

Introduction

In this assignment, you will study a complex object or state of affairs within a topic area you agreed upon with your instructor and write a short essay that sufficiently and accurately describes that situation for readers. Instructors will allow you a considerable range of topic choice, so that you can explore and write about items or situations relevant to your chosen discipline. Social workers and economists, for example, might decide to write about completely different situations. Even if they were to choose the same area (for example, the relationship between family income and lifestyle), their considerations, because of widely different academic disciplines, would be significantly different.

Where persuasive writing required you to take a stance and organize a reasonable argument for the stance taken, you will concentrate on clear and accurate description in this assignment.

Instructions

At the beginning of Unit Eight, you will select a topic for study and receive approval from the course instructor.

By the end of the unit, you will plan, write, edit, and submit a short original essay (no more than 600 words), in which you describe the object you have selected. Your essay must have careful discussion in which you describe the objects and relationships that are critical to understanding the situation you have chosen. You must articulate your ideas clearly, and your essay must be well organized overall and in terms of the individual paragraphs of the essay. Your work must also be very carefully edited.

Criteria for Marking

There are four main categories for marks, content, clarity, organization, and mechanics.

· Content (40 marks): choice and amount of description of objects and sufficiency of discussion of relationships

· Clarity (30 marks): ease of understanding the situation you have described, clarity of the progression of your discussion, and appropriateness of relationships discussed

· Organization (20 marks): proper introduction and conclusion to provide context for the discussion, proper ordering of sentences in paragraphs, and proper transitions between sections of the essay, paragraphs, and sentences.

· Mechanics (10 marks): adherence to proper standards of grammar, spelling, punctuation, capitalization and proper variety in sentence structure and vocabulary.

Completion and Submission Guidelines

We recommend that you keep a copy of each assignment that you submit.

Before you submit your assignment, complete the following checklist.

Did you put your name and student number on the document?

Did you complete all the required elements?

Did you use information and terminology learned in this course?

Where you made general claims, did you support your statements with specific examples?

In those (rare) cases where you have used information from other sources, did you cite references, using a consistent referencing format?

Did you ensure that there are no spelling mistakes?

Is your writing grammatically correct, clear, and well organized?

Have you tried reading it aloud to ensure that it makes sense?

// // travel-expenses.cpp // CECS 100 C++ projects // // Created by Shawn Jordison on 10/14/13. // Copyright (c) 2013 Shawn Jordison. All rights reserved. // #include <iostream> using namespace std; int getNumberOfDays() { int numberOfDays; cout << "How many days did you spend on the trip?\t"; cin >> numberOfDays; while (numberOfDays < 1) { cout << "You cannot spend less than 1 day on a trip." << endl; cout << "How many days did you spend on the trip?\t"; cin >> numberOfDays; } return numberOfDays; } int getTimeOfDeparture() { int timeOfDeparture; cout << "What time did you depart on the first day of the trip? (24h format)\t"; cin >> timeOfDeparture; while (timeOfDeparture < 0 || timeOfDeparture > 24) { cout << "Invalid time." << endl; cout << "What time did you depart on the first day of the trip? (24h format)\t"; cin >> timeOfDeparture; } return timeOfDeparture; } int getTimeOfArrival() { int timeOfArrival; cout << "What time did you arrive home on the last day of the trip? (24h format)\t"; cin >> timeOfArrival; while (timeOfArrival < 0 || timeOfArrival > 24) { cout << "Invalid time." << endl; cout << "What time did you arrive home on the last day of the trip? (24h format)\t"; cin >> timeOfArrival; } return timeOfArrival; } float getAmountRoundTripAirfare() { float amountRoundTripAirfare; cout << "Enter total cost of round trip airfare:\t"; cin >> amountRoundTripAirfare; while (amountRoundTripAirfare < 0) { cout << "You cannot spend less than $0." << endl; cout << "Enter total cost of round trip airfare:\t"; cin >> amountRoundTripAirfare; } return amountRoundTripAirfare; } float getAmountCarRentals() { float amountCarRentals; cout << "Enter the total cost of car rentals:\t"; cin >> amountCarRentals; while (amountCarRentals < 0) { cout << "You cannot spend less than $0." << endl; cout << "Enter the total cost of car rentals:\t"; cin >> amountCarRentals; } return amountCarRentals; } float getMilesDriven() // see if case/switch loop is more appropriate { float milesDriven; string answer; cout << "Did you use a private car at all? (Y/N)\t"; cin >> answer; while ((answer != "Y") && (answer != "y") && (answer != "N") && (answer != "n")) { cout << "Y for Yes, N for No.\t" << endl; cout << "Did you use a private car at all? (Y/N)\t"; cin >> answer; } if ( (answer == "Y") || (answer == "y") ) { cout << "Enter number of miles driven with private car:\t"; cin >> milesDriven; while (milesDriven < 0) { cout << "You cannot drive less than 0 miles." << endl; cout << "Enter number of miles driven with private car:\t"; cin >> milesDriven; } } else milesDriven = 0; return milesDriven * 0.27; } void getAmountParkingFees(float numberOfDays, float totalParkingFees, float allowedParkingFees, float& amountParkingFees, float& excessParkingFees) // function good { allowedParkingFees = allowedParkingFees * numberOfDays; cout << "Enter cost of parking fees by day, below:" << endl; for (int count = 1; count <= numberOfDays ; count++) { cout << "Day " << count << ":\t"; cin >> amountParkingFees; if ((amountParkingFees > 0) && (amountParkingFees <= 6)) { totalParkingFees += amountParkingFees; excessParkingFees = 0; } else if (amountParkingFees > 6) { totalParkingFees += amountParkingFees; excessParkingFees = totalParkingFees - allowedParkingFees; } else { while (amountParkingFees < 0) { cout << "You cannot spend less than $0." << endl; cout << "Day " << count << ":\t"; cin >> amountParkingFees; } } } } void getAmountTaxiFees(float numberOfDays, float totalTaxiFees, float allowedTaxiFees, float& amountTaxiFees, float& excessTaxiFees) // function good { string answer; allowedTaxiFees = allowedTaxiFees * numberOfDays; cout << "Did you use a taxi at all? (Y/N)\t"; cin >> answer; while ((answer != "Y") && (answer != "y") && (answer != "N") && (answer != "n")) { cout << "Y for Yes, N for No.\t" << endl; cout << "Did you use a private car at all? (Y/N)\t"; cin >> answer; } if ( (answer == "Y") | (answer == "y") ) { cout << "Enter cost of taxi fees by day, below:" << endl; for (int count = 1; count <= numberOfDays ; count++) { cout << "Day " << count << ":\t"; cin >> amountTaxiFees; if ((amountTaxiFees > 0) && (amountTaxiFees <= 10)) { totalTaxiFees += amountTaxiFees; excessTaxiFees = 0; } else if (amountTaxiFees > 10) { totalTaxiFees += amountTaxiFees; excessTaxiFees = totalTaxiFees - allowedTaxiFees; } else if (amountTaxiFees < 0) { while (amountTaxiFees < 0) { cout << "You cannot spend less than $0." << endl; cout << "Day " << count << ":\t"; cin >> amountTaxiFees; } } // else // figure out input invalidation for `for loop` // { // while (!isdigit(amountTaxiFees)) // { // cout << "Invalid entry." << endl; // cout << "Day " << count << ":\t"; // cin >> amountTaxiFees; // } // } } } else { amountTaxiFees = 0; excessTaxiFees = 0; totalTaxiFees = 0; } } float getAmountRegistrationFees() { float amountRegistrationFees; cout << "Enter the total cost of conference or seminar registration fees:\t"; cin >> amountRegistrationFees; while (amountRegistrationFees < 0) { cout << "You cannot spend less than $0." << endl; cout << "Enter the total cost of conference or seminar registration fees:\t"; cin >> amountRegistrationFees; } return amountRegistrationFees; } void getAmountHotelExpenses(float allowedHotelExpenses, float& amountHotelExpenses, float& totalHotelExpenses, float& excessHotelExpenses) // function good { float nightsSpentInHotel; cout << "Enter total nights spent in hotel:\t"; cin >> nightsSpentInHotel; while (nightsSpentInHotel < 1) { cout << "You cannot spend less than 1 night in a hotel." << endl; cout << "Enter total nights spent in hotel:\t"; cin >> nightsSpentInHotel; } allowedHotelExpenses = allowedHotelExpenses * nightsSpentInHotel; cout << "Enter cost of lodging fees by day, below:" << endl; for (int count = 1; count <= nightsSpentInHotel ; count++) { cout << "Night " << count << ":\t"; cin >> amountHotelExpenses; if ((amountHotelExpenses > 0) && (amountHotelExpenses <= 90)) { totalHotelExpenses += amountHotelExpenses; excessHotelExpenses = 0; } else if ( amountHotelExpenses > 90) { totalHotelExpenses += amountHotelExpenses; excessHotelExpenses = totalHotelExpenses - allowedHotelExpenses; } else { while (amountHotelExpenses < 0) { cout << "Invalid entry." << endl; cout << "Night " << count << ":\t"; cin >> amountHotelExpenses; } } } } void getAmountDepartureMealPrices(float timeOfDeparture, float& amountDepartureBreakfast, float& amountDepartureLunch, float& amountDepartureDinner, float& totalDepartureBreakfastExpenses, float& totalDepartureLunchExpenses, float& totalDepartureDinnerExpenses, float allowedBreakfastExpenses, float allowedLunchExpenses, float allowedDinnerExpenses, float& excessDepartureBreakfastExpenses, float& excessDepartureLunchExpenses, float& excessDepartureDinnerExpenses) // function good { if ( (timeOfDeparture > 0) && (timeOfDeparture < 7) ) { cout << "How much did breakfast cost on the day of departure?\t"; cin >> amountDepartureBreakfast; if ((amountDepartureBreakfast > 0) && (amountDepartureBreakfast < 9)) { totalDepartureBreakfastExpenses = amountDepartureBreakfast; excessDepartureBreakfastExpenses = 0; } else if ( amountDepartureBreakfast >= 9) { totalDepartureBreakfastExpenses = amountDepartureBreakfast; excessDepartureBreakfastExpenses = totalDepartureBreakfastExpenses - allowedBreakfastExpenses; } else { totalDepartureBreakfastExpenses = 0; excessDepartureBreakfastExpenses = 0; while (amountDepartureBreakfast < 0) { cout << "Invalid entry." << endl; cout << "How much did breakfast cost on the day of departure?\t"; cin >> amountDepartureBreakfast; } } amountDepartureLunch = 0; amountDepartureDinner = 0; totalDepartureLunchExpenses = 0; totalDepartureDinnerExpenses = 0; excessDepartureLunchExpenses = 0; excessDepartureDinnerExpenses = 0; } else if ( (timeOfDeparture > 7) && (timeOfDeparture < 12) ) { cout << "How much did lunch cost on the day of departure?\t"; cin >> amountDepartureLunch; if ((amountDepartureLunch > 0) && (amountDepartureLunch < 12)) { totalDepartureLunchExpenses = amountDepartureLunch; excessDepartureLunchExpenses = 0; } else if ( amountDepartureLunch >= 12) { totalDepartureLunchExpenses = amountDepartureLunch; excessDepartureLunchExpenses = totalDepartureLunchExpenses - allowedLunchExpenses; } else { totalDepartureLunchExpenses = 0; excessDepartureLunchExpenses = 0; while (amountDepartureLunch < 0) { cout << "Invalid entry." << endl; cout << "How much did lunch cost on the day of departure?\t"; cin >> amountDepartureLunch; } } amountDepartureBreakfast = 0; amountDepartureDinner = 0; totalDepartureBreakfastExpenses = 0; totalDepartureDinnerExpenses = 0; excessDepartureBreakfastExpenses = 0; excessDepartureDinnerExpenses = 0; } else if ( (timeOfDeparture > 12) && (timeOfDeparture < 18) ) { cout << "How much did dinner cost on the day of departure?\t"; cin >> amountDepartureDinner; if ((amountDepartureDinner > 0) && (amountDepartureDinner < 16)) { totalDepartureDinnerExpenses = amountDepartureDinner; excessDepartureDinnerExpenses = 0; } else if ( amountDepartureDinner >= 16) { totalDepartureDinnerExpenses = amountDepartureDinner; excessDepartureDinnerExpenses = totalDepartureDinnerExpenses - allowedDinnerExpenses; } else { totalDepartureDinnerExpenses = 0; excessDepartureDinnerExpenses = 0; while (amountDepartureDinner < 0) { cout << "Invalid entry." << endl; cout << "How much did dinner cost on the day of departure?\t"; cin >> amountDepartureDinner; } } amountDepartureBreakfast = 0; amountDepartureLunch = 0; totalDepartureBreakfastExpenses = 0; totalDepartureLunchExpenses = 0; excessDepartureBreakfastExpenses = 0; excessDepartureLunchExpenses = 0; } else { amountDepartureBreakfast = 0; amountDepartureLunch = 0; amountDepartureDinner = 0; totalDepartureBreakfastExpenses = 0; totalDepartureLunchExpenses = 0; totalDepartureDinnerExpenses = 0; excessDepartureBreakfastExpenses = 0; excessDepartureLunchExpenses = 0; excessDepartureDinnerExpenses = 0; } } void getAmountArrivalMealPrices(float timeOfArrival, float& amountArrivalBreakfast, float& amountArrivalLunch, float& totalArrivalBreakfastExpenses, float& totalArrivalLunchExpenses, float& allowedBreakfastExpenses, float& allowedLunchExpenses, float& excessArrivalBreakfastExpenses, float& excessArrivalLunchExpenses) // function good { if ( (timeOfArrival > 8) && (timeOfArrival < 19) ) { cout << "How much did breakfast cost on the day of arrival?\t"; cin >> amountArrivalBreakfast; if ((amountArrivalBreakfast > 0) && (amountArrivalBreakfast < 9)) { totalArrivalBreakfastExpenses = amountArrivalBreakfast; excessArrivalBreakfastExpenses = 0; } else if ( amountArrivalBreakfast >= 9) { totalArrivalBreakfastExpenses = amountArrivalBreakfast; excessArrivalBreakfastExpenses = totalArrivalBreakfastExpenses - allowedBreakfastExpenses; } else { totalArrivalBreakfastExpenses = 0; excessArrivalBreakfastExpenses = 0; while (amountArrivalBreakfast < 0) { cout << "Invalid entry." << endl; cout << "How much did breakfast cost on the day of arrival?\t"; cin >> amountArrivalBreakfast; } } amountArrivalLunch = 0; totalArrivalLunchExpenses = 0; excessArrivalLunchExpenses = 0; } else if ( (timeOfArrival >= 19) && (timeOfArrival <= 23) ) { cout << "How much did lunch cost on the day of arrival?\t"; cin >> amountArrivalLunch; if ((amountArrivalLunch > 0) && (amountArrivalLunch < 12)) { totalArrivalLunchExpenses = amountArrivalLunch; excessArrivalLunchExpenses = 0; } else if (amountArrivalLunch >= 12) { totalArrivalLunchExpenses = amountArrivalLunch; excessArrivalLunchExpenses = totalArrivalLunchExpenses - allowedLunchExpenses; } else { totalArrivalLunchExpenses = 0; excessArrivalLunchExpenses = 0; while (amountArrivalLunch < 0) { cout << "Invalid entry." << endl; cout << "How much did lunch cost on the day of arrival?\t"; cin >> amountArrivalLunch; } } amountArrivalBreakfast = 0; totalArrivalBreakfastExpenses = 0; excessArrivalBreakfastExpenses = 0; } else { amountArrivalBreakfast = 0; amountArrivalLunch = 0; totalArrivalBreakfastExpenses = 0; totalArrivalLunchExpenses = 0; excessArrivalBreakfastExpenses = 0; excessArrivalLunchExpenses = 0; } } float calculateTotalExpenses(float totalAmountRoundTripAirfare, float totalAmountCarRentals, float totalAmountCostMilesDriven, float totalParkingFees, float totalTaxiFees, float totalAmountRegistrationFees, float totalHotelExpenses, float totalDepartureBreakfastExpenses, float totalDepartureLunchExpenses, float totalDepartureDinnerExpenses, float totalArrivalBreakfastExpenses, float totalArrivalLunchExpenses) { return totalAmountRoundTripAirfare + totalAmountCarRentals + totalAmountCostMilesDriven + totalParkingFees + totalTaxiFees + totalAmountRegistrationFees + totalHotelExpenses + totalDepartureBreakfastExpenses + totalDepartureLunchExpenses + totalDepartureDinnerExpenses + totalArrivalBreakfastExpenses + totalArrivalLunchExpenses; } float calculateExcessExpenses(float excessParkingFees, float excessHotelExpenses, float excessDepartureBreakfastExpenses, float excessDepartureLunchExpenses, float excessDepartureDinnerExpenses, float excessArrivalBreakfastExpenses, float excessArrivalLunchExpenses) { return excessParkingFees + excessHotelExpenses + excessDepartureBreakfastExpenses + excessDepartureLunchExpenses + excessDepartureDinnerExpenses + excessArrivalBreakfastExpenses + excessArrivalLunchExpenses; } void displayOutput(float totalTotalExpenses, float totalExcessExpenses) { float overallExpenses = totalTotalExpenses + totalExcessExpenses; cout << endl << "Overall expenses: $" << overallExpenses; cout << endl << "Total covered expenses: $" << totalTotalExpenses; cout << endl << "Total excess expenses: $" << totalExcessExpenses; cout << endl; } int main() { float timeOfDeparture, timeOfArrival, numberOfDays, totalAmountRoundTripAirfare, totalAmountCarRentals, amountParkingFees, excessParkingFees, totalAmountCostMilesDriven, amountTaxiFees, excessTaxiFees, totalAmountRegistrationFees, amountHotelExpenses, totalHotelExpenses, excessHotelExpenses, amountDepartureBreakfast, amountDepartureLunch, amountDepartureDinner, totalDepartureBreakfastExpenses, totalDepartureLunchExpenses, totalDepartureDinnerExpenses, excessDepartureBreakfastExpenses, excessDepartureLunchExpenses, excessDepartureDinnerExpenses, amountArrivalBreakfast, amountArrivalLunch, totalArrivalBreakfastExpenses, totalArrivalLunchExpenses, excessArrivalBreakfastExpenses, excessArrivalLunchExpenses, totalTotalExpenses, totalExcessExpenses; float totalParkingFees = 0, totalTaxiFees = 0, allowedParkingFees = 6, allowedTaxiFees = 10, allowedHotelExpenses = 90; numberOfDays = getNumberOfDays(); timeOfDeparture = getTimeOfDeparture(); timeOfArrival = getTimeOfArrival(); float allowedBreakfastExpenses = 9, allowedLunchExpenses = 12, allowedDinnerExpenses = 16; getAmountDepartureMealPrices(timeOfDeparture, amountDepartureBreakfast, amountDepartureLunch, amountDepartureDinner, totalDepartureBreakfastExpenses, totalDepartureLunchExpenses, totalDepartureDinnerExpenses, allowedBreakfastExpenses, allowedLunchExpenses, allowedDinnerExpenses, excessDepartureBreakfastExpenses, excessDepartureLunchExpenses, excessDepartureDinnerExpenses); getAmountArrivalMealPrices(timeOfArrival, amountArrivalBreakfast, amountArrivalLunch, totalArrivalBreakfastExpenses, totalArrivalLunchExpenses, allowedBreakfastExpenses, allowedLunchExpenses, excessArrivalBreakfastExpenses, excessArrivalLunchExpenses); totalAmountRoundTripAirfare = getAmountRoundTripAirfare(); totalAmountRegistrationFees = getAmountRegistrationFees(); getAmountHotelExpenses(allowedHotelExpenses, amountHotelExpenses, totalHotelExpenses, excessHotelExpenses); totalAmountCarRentals = getAmountCarRentals(); totalAmountCostMilesDriven = getMilesDriven(); getAmountParkingFees(numberOfDays, totalParkingFees, allowedParkingFees, amountParkingFees, excessParkingFees); getAmountTaxiFees(numberOfDays, totalTaxiFees, allowedTaxiFees, amountTaxiFees, excessTaxiFees); totalTotalExpenses = calculateTotalExpenses(totalAmountRoundTripAirfare, totalAmountCarRentals, totalAmountCostMilesDriven, totalParkingFees, totalTaxiFees, totalAmountRegistrationFees, totalHotelExpenses, totalDepartureBreakfastExpenses, totalDepartureLunchExpenses, totalDepartureDinnerExpenses, totalArrivalBreakfastExpenses, totalArrivalLunchExpenses); totalExcessExpenses = calculateExcessExpenses(excessParkingFees, excessHotelExpenses, excessDepartureBreakfastExpenses, excessDepartureLunchExpenses, excessDepartureDinnerExpenses, excessArrivalBreakfastExpenses, excessArrivalLunchExpenses); displayOutput(totalTotalExpenses, totalExcessExpenses); return 0; }

Get help from top-rated tutors in any subject.

Efficiently complete your homework and academic assignments by getting help from the experts at homeworkarchive.com