Free Essay

Cmis102 Homework Assignment 1

In: Computers and Technology

Submitted By ortoch
Words 495
Pages 2
CMIS102 Homework Assignment 1 (Worth 13% of your grade)

Problem definition: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular.

A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section.

You need to determine the area of 4 rooms added together so you will need to allow the user to input both length and width for 4 separate rooms. You will then need to write code to multiply the length and width of each room separately and then add all four together. All variables will need to be float in anticipation of fractions of feet.

length1 = first room length

width1 = first room width

area1 = area of first room

length2 = second room length

width2 = second room width

area2 = area of second room

length3 = third room length

width3 = third room width

area3 = area of third room

length4 = fourth room length

width4 = fourth room width

area4 = area of fourth room

totalarea = final output variable for total square feet of home

B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.

Main

Write "What is the room one's length in feet?"

Declare length1 As Float

Input length1

Write "What is the room one's width in feet?"

Declare width1 As Float

Input width1

Declare area1 As Float

Set area1 = width1 * length1

Write "What is the room two's length in feet?"

Declare length2 As Float

Input length2

Write "What is the room two's width in feet?"

Declare width2 As Float

Input width2

Declare area2 As Float

Set area2 = width2 * length2

Write "What is the room three's length in feet?"

Declare length3 As Float

Input length3

Write "What is the room three's width in feet?"

Declare width3 As Float

Input width3

Declare area3 As Float

Set area3 = width3 * length3

Write "What is the room four's length in feet?"

Declare length4 As Float

Input length4

Write "What is the room four's width in feet?"

Declare width4 As Float

Input width4

Declare area4 As Float

Set area4 = width4 * length4

Declare totalarea As Float

totalarea = area1 + area2 + area3 + area4

Write "The total square feet of the home is"

Write totalarea.

End Main

C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.

Table 1. Include your test data table here

|Input: Room length and width (in feet) |Expected output: Total square footage of house (in |
| |square feet) |
|Room1: length=10, width=14; |374 |
|Room 2: length=9, width=10; | |
|Room 3: length=12, width=12; | |
|Room1: length=12, width=14; |268 |
|Room 2: length=10, width=10; | |
|Room1: length=8, width=10; |388 |
|Room 2: length= 10, width=8; | |
|Room 3: length=12, width=12; | |
|Room 4: length= 7, width=12; | |

The program works as expected with the above calculations as far as I can tell.

Similar Documents

Free Essay

Homework Assignment 1 Environmental Science

...w Keily Vilchez Environmental Science Professor: Nunez Homework Assignment #1 Practice Quiz 1) Describe why fishing has changed at Apo Island, and the direct and indirect effects on people’s live. Thirty years ago, the use of destructive fishing techniques such as dynamite fishing, trawling, and muroami had severely impacted the state of reefs and fish habitats, depleting fish stocks in the area. In response to this, scientists came to Apo Island to collaborate with the locals to develop reserves that allowed fish populations to replenish as well as to restrict any future fishing activities to low-impact methods such as lines, traps, and hand-nettings. The direct effect of this was that the available amount of fish went up, allowing locals to obtain fish with much greater ease. As they didn't have to spend as much time obtaining food, the locals had more time to devote themselves to building up the island's economy through other avenues such as tourism or through the development of infrastructure (such as schools). 3) Distinguish between a hypothesis and a theory. A hypothesis is the first postulation of an idea, usually based on an observation and the indication of a relationship. A theory is the final stage in the proof of an idea, where enough evidence has been collected to verify the exact relationship and there is no evidence refuting the postulation or contradicting the relationship. A theory is usually......

Words: 466 - Pages: 2

Premium Essay

Pt1420 Unit 8 Assignment 1: Homework

...instructions in a computer program which loops endlessly. Example of an infinite loop: Set k = 1 While k < = 5 Display k End While 7. A FOR loop looks like what other loop in a flowchart? A For loop looks like a count-controlled loop. 8. Why is it critical that accumulator variables are properly initialized? An accumulator is used to keep a running total of numbers. In a loop, a value is usually added to the current value of the accumulator. If it is not properly initialized, it will not contain the correct total. 9. What is the advantage of using a sentinel? The advantage of using a sentinel is that when you are processing a long list of values with a loop a sentinel marks the end of a list of items. There is no limit to how many times a loop can execute. 10. Why must the value chosen for use as a sentinel be carefully selected? The value of a sentinel needs to be carefully selected because it can’t be mistaken as a regular value in the list. Algorithm Workbench: 3. // Declare a counter variable. Declare Integer // Constant for the maximum value Constant Integer MAX_VALUE = 100 //Display the multiples of 10 from 0 through 100 For counter = 0 to MAX_VALUE Display counter End For   4. //Declare Integer number Declare an accumulator variable Declare Integer total = 0 Declare Integer counter For counter = 1 to 10 Display “Enter a number.” Input number Set total = total + number End......

Words: 303 - Pages: 2

Premium Essay

Unit 3 Assignment 1: Homework

...Dr. Davis PT1420 26 June 2014 Unit 3 Assignment 1: Homework 5. Write a pseudo code statement that declares the variable cost so that so that it can hold real numbers. a. declare real cost 6. Write a pseudo code statement that declares the variable total so that it can hold integers. Initialize the variable with value zero. a. Declare real price = 0.00 display “the original price” input items original price display “price” 3. Write assignment statements that perform the following operations with variables a, b and c. a. set b = a+2 b. set a = b*4 c. set b = a/3.14 d. set a= b-8 7. Write a pseudo code statement that assigns the value 27 to the variable count. A count: = 27 8. Write pseudo code statement that assigns the sum of 10 and 14 to the variable total. a. declare integer total set total = 10+14 display total 9. Write a pseudo code statement that subtracts the variable down payment from the variable total and assigns the result for the variable due. a. declare integer down payment declare integer total declare integer due set due = total – down payment display “down payment “ input down payment 10. Write a pseudo code statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable total fee a. declare real subtotal declare real totalfee set totalfee subtotal * 0.15 display “subtotal” input subtotal display totalfee 4. Assume the variable result,...

Words: 550 - Pages: 3

Premium Essay

Week 1 Homework Assignment

...Will Davis July 13, 2014 Week 1 Homework Assignment Which economic system is best suited for handling a crisis of epic proportions (hurricane, flood, blizzard, forest fire, etc.)? Why? NIMS (National Incidence Management System) also known as FEMA. When there is a natural disaster, emergency crews (fire department, ambulance, police etc.) is usually the first help on the scene to help people out. Socialism system offers the best solution for handling emergency situations because the government takes care of paying the people who work there so everyone can focus on helping the people in need. Being a not for profit organization means that everyone doing what they are supposed to and looking after injured people's best interest. Socialism in its perfect form (which rarely ever happens) seems to be the best economic system because it teaches people how to share things with your neighbor and to help out on the time of need. Describe and explain why a socialist system might be the best in responding to the needs of people struck by an emergency situation like the earthquake that occurred in Haiti in January 2010. A socialist society is more likely to have immediate and controlled impact on an emergency situation like the ones suffered in recent years throughout the world. Socialist societies are base in the good of the nation and the human needs of the people making them more efficient in regrouping and reorganizing their efforts. In these societies, each person has a......

Words: 829 - Pages: 4

Free Essay

Homework #1

...Homework assignment #1 Homework assignment #1 Michael Sterner Michael_lee_sterner@yahoo.com Content Introduction…………………………………………………………………………...page 2 Question 1 ……………………………….………………….………………………… page Question 2 ……………………………….………………….………………………… page Question 3 ……………………………….………………….………………………… page Conclusion………………………………………………………………………....... page References………………………………………………………………………....... page Homework assignment#1 Hello my name is Michael Sterner and I am writing a essay to day to answer some questions on a few topics about our economy. The purpose of this paper is to answer 3 questions about (1)Which economic system is best suited for handling a crisis of epic proportions (hurricane, flood, blizzard, forest fire, etc.)? Why? (2) Describe and explain why a socialist system might be the best in responding to the needs of people struck by an emergency situation like the earthquake that occurred in Haiti in January 2010? And finally (3) Use the laws of supply and demand to explain why the cost to heat our homes and businesses goes up in the winter time. Be sure to explain your answer fully? Q1: Which economic system is best suited for handling a crisis of epic proportions (hurricane, flood, blizzard, forest fire, etc.)? Why? The Socialism system seems to offer the best resolution for controlling emergency situations. Socialism, in its perfect form, would be the best economic system to assist people because......

Words: 410 - Pages: 2

Premium Essay

Week 1 Homework Assignment

...BUSN 5200 Homework Assignment for Week 1: 1. Describe the field of finance. How is it different from the field of accounting? Finance is a multifaceted field that relates to many aspects of life and business and it is beneficial to understand its impact. Knowing how finance works in different areas is crucial in budgeting investing and making your assets go far. In the text, Finance consists of three areas; corporate finance, investments and financial institutions. Corporate finance ( synonymous with business finance). Investments, which consist of financial assets like stocks, bonds; in this field you deal a lot with stock brokers as well as security or financial analysts. Financial institutions which are most commonly banks, insurance agencies, etc. and deal with financial transactions. There is a fourth element which the former three categories fall under which is international finance; however, is overseas and expands the definition of finance. Accounting vs Finance. Accountants should possess at least a general knowledge and more depending on their occupation because Finance and Accounting should go hand in hand, meaning one cannot exist without the other. In areas of corporate finance it is required to have accounting experience or education because many accounting principles use finance in its business decisions and duties. Additionally, as finance grows and changes it affects accounting practices, i.e. financial statements. Furthermore, cost......

Words: 1439 - Pages: 6

Free Essay

Unit 2 Assignment 1 : Homework

...Short Answer 1. A professional programmer usually begins by creating a design of the program to gain an understanding of the problem. 2. Pseudocode is a fake code. 3. The three steps that the computer programs typically perform are input is received, some process is performed on the input, and output is produced. 4. “user friendly” means programs that are easy to use. Algorithm Workbench 1. Display “What is your height?” Input height Display “Here is the height you entered:” Display height 2. Display “What is your favorite color?” Input color Display “Here is the color you entered:” Display color Programming Exercise 1.Personal Information Display “What is your name?” Input name Display “What is your address, city, state, and zip?” Input address, city, state, zip Display “What is your telephone number?” Input telephoneNumber Display “What is your college major?” Input collegeMajor Display name,address,city,state,zip,telephoneNumber,collegeMajor 2. Sales Prediction Display “Enter the projected amount of total sales” Input totalSales Set dollars =0.23 Display totalSales*setdollars 3. Land Calculation Display “Enter total square feet of land” Input squareFeet Set 43,560 == one acre Declare / squareFeet by 43,560 to get acres 4 Total Purchase Display “What is the price of this item” Input price Display “What is the price of item 2” Input price 2 Display “What is the price of item 3” Input......

Words: 264 - Pages: 2

Premium Essay

Flm 100 Module 1 Homework Assignment

...FLM 100: INTRODUCTION TO FILM HISTORY FLM 100: INTRODUCTION TO FILM HISTORY Author Note This paper was prepared for FLM 100: INTRODUCTION TO FILM HISTORY, MODULE 1, taught by MARC THOMSON. Directions: Using word processing software to save and submit your work, please answer the following short answer questions. All responses to questions should be one to two paragraphs, composed of five to seven sentences, in length. Your responses should include examples from the reading assignments. 1. Explain the role of the Kinetoscope during the period of cinema's invention. How did the Kinetoscope modify the capabilities of earlier camera and projection systems? The Kinetoscope was designed to show moving photographs by Edison and his assistant Dickson, who did much of the work. Dickson used Eastman film that he sliced 1 inch wide. He spliced them from end to end, with four holes on either side of the frames in order for toothed gears to pull the film through. The Kinetoscope was activated by viewers putting a coin in the slot. The viewers viewed the short film through a peep hole. 2. What steps did France's Lumière brothers take to make cinema a commercially viable enterprise? What kinds of Lumière movies were the most popular? How did the Lumières' activities influence the development of world cinema? The Lumiere brothers invented a projection system which helped make cinema a commercially viable enterprise....

Words: 796 - Pages: 4

Free Essay

Homework Assignment: Chapters 1 Questions 4 and 7

...Week 1 Homework Assignment: Chapters 1 Questions 4 and 7 Cruz A. Morin II Devry University Chapter 1 4. Why does word – of – mouth “advertising” work so effectively? Word – of – mouth advertising works of effectively because it is the simplest way to advertise. When people receive either excellent service or a good deal on a product they will talk about to everyone they know. Companies know this really well and want to ensure that is what is delivered to each customer weather it is a new customer or someone that has been a customer for a long time. Every company wants positive word – of – mouth advertising because it is free to them. The other way that word – of – mouth advertising is being updated now is with the use of social media by everyone. Besides regular social media sites you also have review sites that people post both good and bad reviews on (ex. YELP). 7. What do we mean by an “engaged” customer, and how does this relate to customer loyalty? An “engaged” customer is someone who feels that they have an emotional tie to the company that they are doing business with. Most companies will use loyalty programs to in a way entice customers to keep returning. When extremely satisfied customers have been asked if they felt an emotional tie and many said no. If a company wants to truly rise the level of customer loyalty they have to increase the emotional tie in that each customer fills and at the end of the day if there is no tie in with the emotions then...

Words: 298 - Pages: 2

Premium Essay

Unit 2 Assignment 1: Homework

...Short Answers Page 71 1. What does a professional programmer usually do first to gain an understanding of a problem? They begin by creating a design of the program. 2. What is pseudocode? Programs used during the design process 3. Computer programs typically perform what three steps? Input process output 4. What does the term “user-friendly” mean? Programs that are easy to use Algorithm Workbench 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. 1. Dim Height As Double 2. Console.writeline(“Enter your Height:”) Save height as 3. Height = Console.readline() 4. Console.writeline(“Your Height Is: “ & Height) 5. Console.writeline(“Press Enter To Close.”) 6. Console.writeline() 2. Design an algorithm that prompts the user to enter his or her favorite color and stores the user’s input in a variable named color. 1. Dim Color As Double 2. Console.write(“Enter Your Favorite Color:”) Save color as 3. color = Console.readline() 4. Console.writeline(“Your Favorite Color Is: “&color) 5. Console.writeline(“Press Enter To Close.”) 6. Console.readline() Programming Exercises 1. Personal Information Design a program that displays the following information: Your name Your address, with city, state, and ZIP Your telephone number Your college major Dim Color As Double Console.write(“Enter Your Name:”) Name = Console.readline() Console.write (“Enter your......

Words: 441 - Pages: 2

Premium Essay

Homework Assignment 1

...Homework Assignment 1 Natasha Dodson Allied American University Author Note This paper was prepared for [ENG 160], [HOMEWORK ASSIGNMENT 1] taught by [MARC THOMPSON]. Essay Writing: Part 1 PART I I. Introduction II. Body A. Traveling 1. Luggage 2. People 3. Airlines B. Vendors 1. Restaurants 2. Souvenir Shops 3. Massage and Relaxation C. Security Measures 1. Police 2. Transportation Security Administration and Homeland Security 3. Random baggage checks III. Conclusion PART II 1. What is the thesis of Johnson’s essay? If it is stated directly, locate the relevant sentence or sentences. If it is implied, state the thesis in your own words. In my opinion the thesis of Lou’s Place is implied. It does imply that Lou and his customers have an unspoken bond and fondness for one another, even though they belittle each other and the customer pays to pour their own coffee. Lou’s Place is not that place where the service is perfect or the conversation is polite. It is that place where you can be yourself; cook your own eggs and where service is not at all prompt. It is almost as if you are at home with family and friends. You will be criticized before you even find a complement. 2. Which statement would best serve as a topic sentence for paragraph 13? Explain why. I think the best topic sentence for paragraph 13 would be “Regular customers at Lou’s are used......

Words: 870 - Pages: 4

Premium Essay

Acct 301 Homework Assignments Week 1 to 7

...ACCT 301 HOMEWORK ASSIGNMENTS WEEK 1 TO 7 To purchase this visit following link: http://www.activitymode.com/product/acct-301-homework-assignments-week-1-to-7/ Contact us at: SUPPORT@ACTIVITYMODE.COM ACCT 301 HOMEWORK ASSIGNMENTS WEEK 1 TO 7 ACCT 301 Homework Assignments Week 1 To 7 ACCT 301 Week 1 Homework (Problems & Solutions) ACCT 301 Week 2 Homework (Problems & Solutions) ACCT 301 Week 3 Homework (Problems & Solutions) ACCT 301 Week 4 Homework (Problems & Solutions) ACCT 301 Week 5 Homework (Problems & Solutions) ACCT 301 Week 6 Homework (Problems & Solutions) ACCT 301 Week 7 Homework (Problems & Solutions) Activity mode aims to provide quality study notes and tutorials to the students of ACCT 301 Homework Assignments Week 1 To 7 in order to ace their studies. ACCT 301 HOMEWORK ASSIGNMENTS WEEK 1 TO 7 To purchase this visit following link: http://www.activitymode.com/product/acct-301-homework-assignments-week-1-to-7/ Contact us at: SUPPORT@ACTIVITYMODE.COM ACCT 301 HOMEWORK ASSIGNMENTS WEEK 1 TO 7 ACCT 301 Homework Assignments Week 1 To 7 ACCT 301 Week 1 Homework (Problems & Solutions) ACCT 301 Week 2 Homework (Problems & Solutions) ACCT 301 Week 3 Homework (Problems & Solutions) ACCT 301 Week 4 Homework (Problems & Solutions) ACCT 301 Week 5 Homework (Problems & Solutions) ACCT 301 Week 6 Homework (Problems & Solutions) ACCT 301 Week 7 Homework (Problems & Solutions) Activity mode aims to provide quality study notes and tutorials to the......

Words: 631 - Pages: 3

Premium Essay

Finc 5000 Homework Assignment for Week 1

...FINC 5000 Homework Assignment for Week 1 Click Link Below To Buy: http://hwcampus.com/shop/finc-5000-homework-assignment-for-week-1/ For Week 1, please turn in the answers to the following questions: Chapter 1: 1. Describe the field of finance. How is it different from the field of accounting? 2. What are the three forms of business generally encountered in the US? What are the main defining characteristics of each? 3. What should be the basic financial goal of a business? 4. In the context of a corporation seeking to maximize the wealth of its owners, how is “wealth” defined? 5. What are the three broad factors that influence the market price of a corporation’s stock? 6. Name three ways in which businesses can raise money from external sources when they need it for expansion or project funding. Chapter 2: 7. What is the purpose of a balance sheet? What are some examples of typical balance sheet accounts? 8. What is the purpose of an income statement? What are some examples of typical income statement accounts? 9. What is the purpose of a statement of cash flows? What are some examples of typical statement of cash flow accounts? 10. a. What are “Free Cash Flows (FCF)?” b. What is “NOPAT?” 11. What was Joe’s average, or effective tax rate in 2014? 12. What was Joe’s NOPAT in 2014? 13. What was Joe’s Free Cash Flow (FCF) in 2014? (Note: For......

Words: 442 - Pages: 2

Premium Essay

Pt1420 Unit 2 Assignment 1: Homework

...Short Answer: 1.) The first thing a programmer usually does first in programming is design flowcharts and pseudocode which will help with process. 2.) Pseudocode code is a fake code used as a model for programs; it has no syntax rules and is well written making it easy to translate to actual codes. 3.) Computer programs typically perform a three step process 1 input is received, 2 some process is performed on the input, 3 output is produced. 4.) “User-friendly” is commonly used in the software business to describe programs that are easy to use. Algorithm Workbench: 1.) 1 Display “Height” 2 Input height 3 Display “here is the height that you entered:”, height 2.) 1 Display “Favorite color” 2 Input favorite color 3 Display “Here is your favorite color you entered:”, color Programming Exercises: 1.) Personal Information 1 Display “Name” 2 Input Name 3 Display “Here is the name you have entered:”, name 4 Display “Address with city, state, and ZIP” 5 Input address with city, state, and ZIP 6 Display “This is the address you have entered:”, address with city, state, and ZIP 7 Display “Telephone number” 8 Input telephone number 9 Display “This is the telephone number you have entered:”, telephone 10 Display “College Major” 11 Input college major 12 Display “This is the college major you have entered:”, college major 4.) Total Price 1 Display “enter the items original price” 2 Input originalPrice 3 Set SalePrice = OriginalPrice *......

Words: 251 - Pages: 2

Premium Essay

Finc 5000 Homework Assignment for Week 1

...FINC 5000 Homework Assignment for Week 1 Click Link Below To Buy: http://hwcampus.com/shop/finc-5000-homework-assignment-for-week-1/ For Week 1, please turn in the answers to the following questions: Chapter 1: 1. Describe the field of finance. How is it different from the field of accounting? 2. What are the three forms of business generally encountered in the US? What are the main defining characteristics of each? 3. What should be the basic financial goal of a business? 4. In the context of a corporation seeking to maximize the wealth of its owners, how is “wealth” defined? 5. What are the three broad factors that influence the market price of a corporation’s stock? 6. Name three ways in which businesses can raise money from external sources when they need it for expansion or project funding. Chapter 2: 7. What is the purpose of a balance sheet? What are some examples of typical balance sheet accounts? 8. What is the purpose of an income statement? What are some examples of typical income statement accounts? 9. What is the purpose of a statement of cash flows? What are some examples of typical statement of cash flow accounts? 10. a. What are “Free Cash Flows (FCF)?” b. What is “NOPAT?” 11. What was Joe’s average, or effective tax rate in 2014? 12. What was Joe’s NOPAT in 2014? 13. What was Joe’s Free Cash Flow (FCF) in 2014? (Note: For......

Words: 442 - Pages: 2