Free Essay

Programing

In:

Submitted By shamartist83
Words 446
Pages 2
Homework 1 In this program we will be calculating the usable square feet for a house with a maximum of four rooms with different measurements that a user can input in order to get the output of usable square feet. I will explore the steps on how to exactly figure out the square feet of each room and then the square feet of the house. I will also create three sets of test data that we will use to include the inputs and the expected output of each test case. At the end of it all, I will provide the pseudocode of my overall design. In this step, I will need to figure out how to exactly calculate the square feet or area of a rectangle. With a little refresher in math I found the formula A = L * W or L * W = A, where A is the area, L is the length, W is the width, and * simply means to multiply. Here is an example of the calculation of room 1; we will give L a value of 30 ft. and W a value of 20 ft. giving us 30 * 20 = A. Now that we know the values of L and W we can find the value of A by multiplying L by W, giving us 30 * 20 = 600 sq. ft. So in room 1 we have 600 square feet. Using the above formula we can go two different routes with our calculations. One way is to have the user input the total length of all rooms added together and doing the same with the width of the rooms. This would have the program only have two inputs and one output. The other way would be to have the user input the values of the rooms’ length separately and again the same with the widths. Either way gives the same output as the total usable square feet. This would give the programmer flexibility on how complex the code might be. I have gone over that the program need to calculate the total usable square feet of a house having one to four rooms. I have also explored the formula (A = L * W) used to calculate

the needed output with L and W being the input from the user on screen. I have also listed two different ways the program could be coded. Listed below you will find the test cases with the inputs and the expected output. I will also use the information of requirements listed in this to write the pseudocode.

// This program will calculate the total square feet of a house with up to four rooms.
// Declare variables
// Declare Length, Width, SquareFeet as Integers

Similar Documents

Free Essay

Programing

...Universiteti I Tiranes Fakulteti I Shkencave te Natyres Dega:Informatike Detyre Kursi Tema: Te shkruhet nje program qe lexon oren me shifra ne formatin hhmm dhe e paraqet ate me fjale. Donaldo Lika Grupi: A1 #include <stdio.h> #include <conio.h> int main() { int numri,ora,minuti; printf("KTHIMI I ORES NGA NUMRA NE KARAKTERE"); printf("\nFutni oren: "); scanf("%d" , &numri); int error_o =0; ora = numri/100; //ora do jene 2 shifrat e para te numrit if(numri%100>30) ora = numri/100 + 1; //nqs minutat e kalojne 30 ora do rritet me nje if((numri%100)%1==0) //bejme kontrollin qe minutat te jene ne formatin e duhur { switch(ora){ case 0: printf("ORA ESHTE : <<Dymbedhjete"); break; case 1: case 13: printf("ORA ESHTE : <<Nje"); break; case 2: case 14: printf("ORA ESHTE : <<Dy"); break; case 3: case 15: printf("ORA ESHTE : <<Tre"); break; case 4: case 16: printf("ORA ESHTE : <<Kater"); break; case 5: case 17: printf("ORA ESHTE : <<Pese"); break; case 6: case 18: printf("ORA ESHTE : <<Gjashte"); break; case 7: case 19: printf("ORA ESHTE : <<Shtate"); break; ...

Words: 834 - Pages: 4

Premium Essay

Programing

...JOY’S TOYS MISSION STATEMENT Joy’s Toys produces a wide line of moderately priced educational toys for preschool and young school-aged children. We service a four-state area surrounding Missouri and sell directly to schools or school district buying centers. Our first product priority is quality. We would rather lose a sale by being overpriced than sell low-quality merchandise. We offer quick and accessible service and repair on all merchandise we sell. We care about children and view their education as the critical part of our task. Our toys are designed to enrich the child’s educational experience. All design work is done in-house to assure responsive, innovative products. In hiring sales representatives, we seek to attract former primary school teachers who are in tune with the needs and wants of children and who can identify with the concerns of parents. We exclusively promote from within. ANALYSIS OF JOY’S TOYS MISSION STATEMENT |Joy’s Toys produces a wide line of moderately priced educational toys |THE NATURE OF THE BUSINESS | |for preschool and young school-aged children. We service a four-state|Identify the industry and product line of the company | |area surrounding Missouri and sell directly to schools or school | | |district buying centers. |Identify the...

Words: 785 - Pages: 4

Premium Essay

Pbject Oriented Programing

...Object-oriented Programming (OOP) / Event-Driven Programming (EDP) versus Procedural Programming (PP) Strayer University CIS Computer Programing Design Francis Straz Dr. Kolta 03/15/14 In OOP, code and data are merged into one standard item, an object. An object is an abstraction of a set of real-world item. The object would contain all information and functionality for that item; ideally, information about a particular item should reside in only one place in a system. Programmer’s information within an object that is encapsulated from the rest of the Program. If a change is made in the object, it doesn’t mean that it also has to be changed throughout the program. It may not have to be changed. However, when we use Object Orientated programming if an object is changed significantly enough then there is no way around the notion if probably changing the way it is called from the rest of the program and thus breaking the rest of the program as well. One thing to keep in mind is how many times the programmer plans on using the object.  When the programmer uses traditional programming functions and these functions do a specific task. In Object Orientated programming languages include features such as "class", "”Inheritance” and "polymorphism" that the power and flexibility of an object. So you can build off of one object and create a more advanced version of that object. Inheritance is often an approach to reuse program code of existing objects, in order to establish...

Words: 875 - Pages: 4

Premium Essay

Intro Programing

...Five popular programming languages in the following decades: 1970s, 1980s, 1990s, and 2000s. 1970s * 1970 - Pascal: Developed by Niklaus Wirth. Efficient language intended to encourage good programming practices using structured programming and data structuring. * 1972 - C: Developed by Dennis Ritchie and Ken Thompson at Bell Labs. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. * 1972 - Smalltalk: Developed by Learning Research Group (LRG) of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and others. It was designed and created in part for educational use, more so for constructionist learning * 1972 - Prolog: Developed by Colmerauer, Roussel, and Kowalski.Was the first logic programming language. * 1973 - ML: Developed by Robin Milner. Built a polymorphic type system on top of Lisp, pioneering statically typed functional programming languages. 1980s * 1980 - C++ : Developed by Bjarne Stroustrup. The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. It is an efficient compiler to native code, its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications * 1983 - Ada : Developed...

Words: 791 - Pages: 4

Free Essay

Linear Programing

...www.obe4u.com/arabic/ 1 ‫/‪www.obe4u.com/arabic‬‬ ‫مركز أبحاث ‪ OOBE‬يقدم‬ ‫الحلم الجلية وتجربة الخروج من الجسد خلل 3 أيام‬ ‫‪Michael Raduga‬‬ ‫)‪(Translated by Sameh Elnokaly‬‬ ‫/‪www.obe4u.com/arabic‬‬ ‫معدلت النجاح‬ ‫%لعدد محاولت من 1 إلى 5 )من 1 إلى 3 أيام( – 05‬ ‫%لعدد محاولت من 6 إلى 01 )من 2 إلى 7 أيام( – 08‬ ‫%لعدد محاولت من 11 إلى 02 )من 3 إلى 41 يوم( – 09‬ ‫شارك اللف بشكل مباشر في تطوير وإتقان السلوب‬ ‫المقدم هنا )بواسطة مركز أبحاث ‪(OOBE‬‬ ‫يمكن إرسال مقترحاتكم بخصوص ترجمة ونشر إصدار الكتاب الكامل‬ ‫)005 صفحة( وأعمال أخرى للسيد/ رادوجا، إلى البريد اللكتروني‬ ‫‪obe4u@obe4u.com‬‬ ‫2‬ ‫/‪www.obe4u.com/arabic‬‬ ‫الحلم الجلية و تجربة الخروج من الجسد‬ ‫منذ زمن بعيد لم يكن البشر على دراية بالوعي. إلى أن تطور الوعي تدريجيا ح‪CC‬تى‬ ‫بدأ يحتل المزيد والمزيد من حالة اليقظة. أما في الوقت الحاضر، فقد تخط‪CC‬ى ال‪CC‬وعي حال‪CC‬ة‬ ‫اليقظة، وبدأ في استمرارية توسعه ف‪CC‬ي ح‪CC‬الت أخ‪CC‬رى. وينطل‪CC‬ق ال‪CC‬وعي عل‪CC‬ى نح‪CC‬و متزاي‪CC‬د‬ ‫خلل نوم حركة العين السريعة، مما يثير الظ‪CC‬اهرة الك‪CC‬ثر إذه‪CC‬ال للوج‪CC‬ود البش‪CC‬ري - وه‪CC‬و‬ ‫ش‪CC‬عور النس‪CC‬ان بتجرب‪CC‬ة الخ‪CC‬روج م‪CC‬ن الجس‪CC‬د )أو الحل‪CC‬م الجل‪CC‬ي(. فم‪CC‬ن المحتم‪CC‬ل أن الرج‪CC‬ال‬ ‫والنس‪CCC‬اء ف‪CCC‬ي المس‪CCC‬تقبل س‪CCC‬يكون له‪CCC‬م وج‪CCC‬ود واع‪CCC‬ي ف‪CCC‬ي ع‪CCC‬المين: الحي‪CCC‬اة الحقيقي‪CCC‬ة والحل‪CCC‬م‬ ‫الجلي/تجربة الخ‪CC‬روج م‪CC‬ن الجس‪CC‬د. أم‪CC‬ا ف‪CC‬ي ال‪CC‬وقت الراه‪CC‬ن فل يمك‪CC‬ن له‪CC‬ذا أن يتحق‪CC‬ق س‪CC‬وى‬ ‫باستخدام أساليب خاصة.‬ ‫ق‪CC‬د...

Words: 5202 - Pages: 21

Free Essay

Programing Paradigm

...Programming paradigm is a fundamental style of computer programming , a way of building the structure and elements of computer programs. There are six main programming paradigms: 1. imperative programming, imperative programming, which is based on procedural languages, literate programming ,which structures programs as a human-centered web, as in a hypertext essay –documentation is integral to the program, and the program is structured following the logic of prose exposition, rather than compiler convenience. 2. declarative programming, declarative programming paradigms were developed. In these languages the computer is told what the problem is, not how to solve the problem – the program is structured as a collection of properties to find in the expected result, not as a procedure to follow. Given a database or a set of rules, the computer tries to find a solution matching all the desired properties. The archetypical example of a declarative language is the fourth generation language SQL, as well as the family of functional languages and logic programming 3. functional programming , Functional programming is a subset of declarative programming. Programs written using this paradigm use functions, blocks of code intended to behave like mathematical functions. Functional languages discourage changes in the value of variables through assignment , making a great deal of use of recursion instead. 4. object-oriented programming , object-oriented languages...

Words: 393 - Pages: 2

Premium Essay

Agile Family Programing

...Family is defined as the “a group consisting of parents and children living together in a household.” This is a general definition to a very broad meaning behind the word “family.” The Agile Family Programing and Agile Family tool kit enables us to focus the “group” of individuals that consists of each member of the family playing a specific role and having specific responsibilities in order to communicate and make connections. The Agile Family Program works on three concepts: adaptability, empowering your children and telling the story. Focusing on the positive and making sure that our children feel the positive vibe will allow them to grow and bring success to a happy family. The lifestyle of an average family is already structured in some way based on work, school, outside school activities, so the key is to adapt to each circumstance and to make it work. The theoretical perspective that best explains using the approach of Agile and the Tool kit would be the Symbolic Interactionist Perspective that explains “cultural ideas shifted, with housework, care of children, and paid labor coming to be regarded as the responsibilities of both men and woman.” This shift in perspective of male and female role can support the Agile Family Programing and Agile Family Tool Kit by empowering each family member to contribute to the positive cohesion of family. It has been statically proven that US families have made still a bigger impact on spending time with the family than the past...

Words: 406 - Pages: 2

Free Essay

First Programing in C#

...Programing in C# Select 7 bottons using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WFejemplo { public partial class frmboton : Form { public frmboton() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { btnprincipal.TextAlign = ContentAlignment.MiddleLeft; } private void button3_Click(object sender, EventArgs e) { btnprincipal.Enabled = true; } private void btninvisible_Click(object sender, EventArgs e) { btnprincipal.Visible = false; } private void btnvisible_Click(object sender, EventArgs e) { btnprincipal.Visible = true; } private void btnsalir_Click(object sender, EventArgs e) { Application.Exit(); } private void btndeshabilitar_Click(object sender, EventArgs e) { btnprincipal.Enabled = false; } private void btncolor_Click(object sender, EventArgs e) { btnprincipal.BackColor = Color.Chocolate; } private void btncentrar_Click(object sender, EventArgs e) { btnprincipal.TextAlign = ContentAlignment.MiddleCenter; } private void btnderecha_Click(object sender...

Words: 1167 - Pages: 5

Premium Essay

Computer Programing

...Computer Programming Programming a computer is almost as easy as using one and does not require you to be a math genius. People who are good at solving story problems make good programmers, and others say that artistic or musical talent is a sign of potential programmer. Various computer languages are described, and tips on choosing the right language and learning how to use it are provided. Learning how to program is actually easier than many people think. Learning to program takes about the same time as two semesters of a college course. The process of learning to program is uniquely reinforcing, because students receive immediate feedback on their screens. The programming languages Basic, Pascal, C, and Database are discussed; tips on learning the languages are offered; and a list of publishers' addresses is provided. One way of programming is rapid application development (RAD) has tremendous powers, but it is not without its limits. The two basic advantages RAD tools promise over traditional programming are shorter, more flexible development cycle and the fact that applications can be developed by a reasonably sophisticated end user. The main disadvantage is that RAD tools often require code to be written, which will result in most developers probably having to learn to program using the underlying programming language, except in the case of the simplest applications. The time gained from using a RAD tool can be immense, however:...

Words: 620 - Pages: 3

Free Essay

C Programing

...CSED 142: INTRODUCTION TO C PROGRAMMING & UNIX (CSE 142) – HW #4 1. Write a C program to convert a number entered by user to its corresponding month and prints both on the screen, e.g., January for 1. If the number is outside the range of 1 to 12 print appropriate message. … int m; printf("Enter a number between 1 and 12:\n"); scanf("%d", &m); switch (m) { case 1: printf("January, %d\n", m); break; case 2: printf("February, %d\n", m); break; case 3: printf("March, %d\n", m); break; case 4: … … case 12: printf("December, %d\n", m); break; default: printf("please enter a number between 1 and 12.\n"); } … 2. Design a multiple choice test and prompt the user to enter the correct answer and print appropriate message to let them know whether the answer was correct or not: Which one of the following is not a type of error? a) Syntax error b) Debugging error c) Runtime error d) Logic error char c; printf("Which one of the following is not a type of error?\n\n"); printf("\ta) Syntax error\n"); printf("\tb) Debugging error\n"); printf("\tc) Runtime error\n"); printf("\td) Logic error\n"); c = getchar(); switch (c) { case 'a': printf("wrong!\n"); break; case 'b': printf("Correct!\n"); break; case 'c': printf("wrong!\n"); break; case 'd': printf("wrong!\n"); break; default: printf("please enter a-d.\n"); } 3. Show that the sum of the following infinite series converges to π (3.141592653589793).  (1) n n  0 2n ...

Words: 340 - Pages: 2

Premium Essay

App Programing

...2/29/2016 Objectives 2  To understand Rapid Application Development (RAD) by outlining A brief history of development approaches leading to it  Rationale  Advantages/Disadvantages  GUI Builders/Designers  Event Driven Programming  Application Programming II Rapid Application Development and Prototyping Rapid Application Development and Prototyping What is RAD? 3 RAD Approaches 4   Rapid Application Development (RAD) is a development lifecycle designed to give much faster development and higher-quality results than those achieved with the traditional lifecycle. It is designed to take the maximum advantage of powerful development software that has evolved recently (Martin, 1991). By using a series of proven application development techniques, within a well-defined methodology, organisations can quickly and cheaply develop systems without compromising on quality . Rapid Application Development and Prototyping Barry Boem’s spiral model  James Martin's RAD methodology  Agile methods  Rapid Application Development and Prototyping 1 2/29/2016 What is RAD? 5 What is RAD? 6 Dr. James Martin came up with the RAD software development methodology/approach in the late 1980’s.  This was in response to the non-agile Stagewise or Waterfall Models methodologies of the 1970s. Unlike the traditional conventional approaches, RAD emphasises development rather than specification and planning.  It...

Words: 3016 - Pages: 13

Premium Essay

Exploring Programing Languages

...Exploring Programing Languages 1970's BASIC - designed by John Kemeny and Thomas Kurtz at Dartmouth College. At first BASIC was modeled on the batch languages of the time in that all of the data that the program would process had to be included in a DATA statement before the program could be run. Pascal - after BASIC was developed, Niklaus Wirth produced a language suitable for teaching computer science C - Dennis Ritchie reworked some of Thompson's ideas to produce the language C in the early seventies at Bell Labs. FORTRAN - added structured statements borrowed from Algol to produce Fortran 77. COBOL- more static and only submitted to slight revision in 74. 1980's C++ - a general purpose programming language. It has imperative, object-oriented and generic programming features, while also providing the facilities for low level memory manipulation. Perl - a family of high-level, general-purpose, interpreted, dynamic programming languages. The languages in this family include Perl 5 and Perl 6. Ada - originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense (DoD) from 1977 to 1983 to supersede the hundreds of programming languages then used by the DoD. Objective-C - a general-purpose, object-oriented programming language originally developed in the early 1980s. It is the main programming language used by Apple. Caml ( Categorical Abstract Machine Language) is a dialect of the ML programming...

Words: 561 - Pages: 3

Premium Essay

Organization of Programing Languages

...or CMP 401 ASSIGNMENT | ORGANIZATION OF PROGRAMMING LANGUAGES | | ANZOTSA JOHN ALAKU | BHU/12/04/05/0042 COMPUTER SCIENCE 400 LEVEL | | | ABRSTRACT My objective for these research was to find out about different programming languages and paradigm in which they belong, the most important use in this research are text and journal by other researchers. After all studies where carried out, I came to a conclusion that one programing language can belong to more than one paradigm C++ C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. Some people say that C++ is a middle language because it has the features of high level and low-level language. As one of the most popular programming languages in the world, C++ is widely used in the software industry. C++ is also used for hardware design to analyze structure. Some of its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. AspectJ AspectJ is a general-purpose Aspect-Oriented extension to java programming language. It was created at Palo Alto Research Center Incorporated (PARC), now it is an open source project and part of the Eclipse Foundation. AspectJ has everything that Java has and more which...

Words: 3773 - Pages: 16

Free Essay

Intro to Programing Logic

...IT106-1201A-05 Introduction to Programming Logic Phase 3 Discussion Board By Norman L Moffatt Jr Date 1/25/12 In this discussion board we are given a problem that is the billing department for the bank has asked for your team’s help. They want to develop a program that will determine the monthly charges for checking accounts. The following criteria are to be used: Balance > = 100.00 will not be charged fees Balance < 100.00 will be charged $9.95 monthly fee The first thing I would do is look at different steps to us to get to the desired answer. After I have figured them out I would write them in order. These steps I am writing down are called an algorithm. Now I had to pick the best algorithm style to use there are three While loop, Do while loop and For loop. I picked For loop due to this is going to be done for 12 months which gives me a set amount. The algorithm in pseudo code steps are START INITIALIZE CONTROL VARIABLE (Checking account Balance) LOGICAL PROCESS (CHECKING BALANCE GREATER > = TO 100) TRUE (DO NOTHING) FALSE (MINUS 9.95 FROM CHECKING ACCOUNT) PRINT NEW BALANCE (YOU ONLY SEE THIS FOR FALSE STATEMENTS) END The flowchart for this discussion we are still using a For flowchart. To do this I first need to identify the symbols I will us. In flowcharts there are a variety of symbols that are used with various operations. The first symbol I used is the one that means start and end. The second symbol I would...

Words: 386 - Pages: 2

Premium Essay

Exploring Programing Language

...1. Look up the history of SQL. How many revisions of the standard have there been? What was added in the most recent one? The language structure English Query (SEQUEL) was developed by IBM corporation, Inc. In 1979 Relational Software, Inc. introduced the first commercially available implementation of SQL. Today SQL is accepted as the standard RBDMS language. The latest SQL standard was adopted in July 1999 and is often called SQL:99 The formal names of this standards are: * ANSI X3.135-1999, “Database Language SQL”, Parts 1 (“Framework”), 2(“Foundation”), and 5(“Bindings”) * ISO/IEC9075:1999, “Database Language SQL”, Parts 1 (“Framework”), 2(“Foundation”), and 5(“Bindings”) 2. A recent trend for major commercial database developers is to offer free “Express” versions of their databases. Microsoft has SQL Express; Oracle has Oracle Express, and DB2 Express. Go to the company websites, and look up these Express editions. What features does each one have? What limits do they have? How do they compare to each other? New in SQL Server Express 2012: SQL Server Express LocalDB SQL Server Express LocalDB LocalDB is a new lightweight deployment option for SQL Server Express Edition with fewer prerequisites that installs very quickly. This makes it ideal for developers who need an embedded SQL Server database for desktop applications or tools. LocalDB has all of the same programmability features as SQL Server Express, but runs in-process with applications and not as a...

Words: 480 - Pages: 2