Free Essay

Programming Final Project

In:

Submitted By dragonbabe05
Words 624
Pages 3
Description

Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who lives in Texas.

Analysis

For the purpose of this program, the user will be asked a series of questions requiring the input of name, age, and state for each of their family member until the number of family members is met. In order to carry out the given task of finding the average age of family members along with the ones who live in Texas, the program should include the function of calculating and displaying the age. It should also include the ability to take the input of family names and print the family members who are only from Texas.

Program Design

Required outputs include:

Average family age

Names of family members only from Texas

Required Inputs:

Names of family members

Ages of family members

States where the family members reside

Variable Declarations/Definitions:

String array (s_Names/s_State) to hold names/states

Integer array (i_Age/i_Count) to hold ages/family members

The information the user inputs (age, name, state) will be stored in the arrays as defined above.

Required Calculations:

Average Age- Average age=(sum of ages of family members) divided by (number of family members provided)

(Example) i_Count=6

i_Age[0]=15, i_Age[1]=25, i_Age[2]=13, i_Age[3]=56, i_Age[4]=70, i_Age[5]=50

The f_avAge= i_Age[0] + i_Age[1] + i_Age[2] +i_Age[3] + i_Age[4] + i_Age [5] divided by i_Count (15+25+13+56+70+50/6=38)

Finding Family Members From Texas- In the s_State array, it looks for indicators containing the string “Texas” and prints the corresponding elements in the s_Names.

(Example) s_State[3]=”Texas”, s_State[4]= “Texas”, s_State[5]=”Texas” and the names in the Name array are the following:

s_Names[0]= Collin

s_Names[1]= Kim

s_Names[2]= Luke

s_Names[3]= Ray

s_Names[4]= Donna

s_Names[5]= Lisa

The program will print those who are from Texas which in this case is Ray, Donna, and Lisa. It will not print Collin since he is from Florida, Kim since she is from Alabama, and Luke since he is from Washington.

Psuedocode

Module Main()
Declare s_Names as String Array
Declare s_Age as Int Array
Declare s_State as String Array
Declare i_Count as Int
Declare f_avAvg as float
Declare lc as Int
While (have more family members to enter) Display “Enter Member Name:” Input s_Names(lc) Display “Enter Member Age:” Input s_Age(lc) Display “Enter state” Input s_State(lc) Increment lc and i_Count
End while calcAverageAge(s_Age, i_Count) call printTexans(s_Names, s_State, i_Count)
End Main

Module calcAverageAge(s_Age, i_Count) Declare f_Avg as float Declare lc1 as Int Declare sum as Int While (lc1 < i_Count) Sum = Sum + s_Age Increment lc1 End While f_Avg = Sum / i_Count Print f_Avg
End Module

Module printTexans(s_Names, s_State, i_Count) Declare lc1 as Integer While (lc1 < i_Count) If s_State(lc1) = “Texas” Print s_Name(lc1) End If End While
End Module

Test Cases

|Test Case # |Input |Expected Output |
|1 |William-Age: 28, State: AL |Average Age- 34.2 |
| |Theresia- Age: 32, State: WA |Members from Texas- |
| |Jennifer- Age: 28, State: TX |Jennifer, Wade |
| |Wade- Age: 37, State: TX | |
| |Kelly- Age: 46, State: SD | |
|2 |Bill- Age: 71, State: CA |Average Age- 43.8 |
| |Virgil- Age: 37, State: WA |Members from Texas- |
| |Dee- Age: 61, State: TX |Dee, Justin |
| |Autumn- Age: 27, State: SD | |
| |Justin- Age: 23, State: TX | |
|3 |Gail- Age: 50, State: AL |Average Age- 31.6 |
| |Daniel- Age: 26, State: TX |Members from Texas- |
| |Lyla- Age: 6, State: WA |Daniel, Shelby, Terry |
| |Shelby- Age: 5, State: TX | |
| |Terry- Age: 71, State: TX | |

Similar Documents

Premium Essay

Bull

...Department of Information Technology ENDT200: Introduction to Programming Credit Hours: 3 Length of Course: 8 Weeks Prerequisite(s): None | Table of Contents | Instructor Information | Evaluation Procedures | Course Description | Grading Scale | Course Scope | Course Outline | Course Objectives | Policies | Course Delivery Method | Academic Services | Course Resources | Selected Bibliography | Instructor Information | Instructor: Jason T. Black, PhD (also called “Dr. B”) Email: Use the Messages feature in the classroom to email me. Table of Contents Course Description (Catalog) | This course introduces students to writing computer programs. The class presents the principles of structured programming using the BASIC language, perhaps the most common language for personal computers. Because of its ease of use it is ideal as a first programming language and runs on both the PC and Macintosh platforms. The course is designed for people without previous programming experience who do not necessarily plan on becoming professional programmers. However, the knowledge gained in the class can be applied later to other languages such as C and Java. Participants learn to solve problems logically by breaking them into smaller pieces, which can then be solved. Topics include: introduction to computing - how does a computer work?; input and output - getting information to and from the user; variables and expressions - performing arithmetic; data...

Words: 2708 - Pages: 11

Premium Essay

Web Design Proposal

...Our team has reviewed your business requirements and has prepared the following detailed proposal. Given our experience and specific expertise in design, usability, programming, SEO, and marketing, we are confident that we can work with you to achieve your aims and goals. Please let me know if you have any questions. We look forward to working with you! ------------------------------------------------- TABLE OF CONTENTS Overview 4 Solutions, Scope of Work, and Deliverables 5-6 1. Preliminary Research 2. Strategic Planning 3. Interface Design - Graphic Design Work 4. Web application Front End Programming 5. Web application Back-end Development 6. Quality Assurance and Launch 7. SEO, Web Promotion, Statistics and Reporting Maintenance and Hosting 7 Fees – special recession rates 8 Payment plan and turn-around time 9 Noam Design Qualifications, responsibilities and commitment 10-11 1. Cutting Edge Technologies & Open Source Philosophy 2. Our experience 3. Our Clients 4. No outsourcing. Period. 5. The team allocated to this project 6. Our Website Your responsibilities 12 Next Steps 12 ------------------------------------------------- OVERVIEW General: The purpose of the project is to execute a complete design & development of a professional Ecommerce website for Client...

Words: 2413 - Pages: 10

Free Essay

Hi This Is Weird

...Hours: Monday - Thursday: 7:20 - 7:45 am; 2:15 – 3:00 pm Course web site: https://sites.google.com/a/southseattle.edu/rick-downs-sci-110/ Meeting Times: Monday – Thursday from 12:00 - 1:40 pm Location: OLY 200 A. Course Description This course is an introduction to engineering design through the design, construction and programming of mobile robots. Students will work in teams to solve a series of problems that are of increasing complexity by designing and constructing robots from kits and programming their controllers to perform the assigned tasks. No previous computer or engineering knowledge is assumed. Enrollment is limited to 24 students. B. Method of Instruction This is a project-based course where students work in teams on a series of focused exercises that will incrementally introduce them to design issues related to mechanics, sensors, motors, and control of an autonomous mobile robot. Lectures will be used to provide students with the necessary background knowledge prior to their work in the laboratory. We will form groups of three students at the beginning of the quarter. Groups will stay together for the first three projects and then new groups will be formed in the 4th week and the 7th week. To get the most out of this class, each group will be expected to take the following issues very seriously: · Equal and fair division of work among the team members · Friendly and open communication among the team members · Effective conflict resolution when...

Words: 1689 - Pages: 7

Free Essay

29:623:311:01-08 Product & Opns Mgmt (Spring 2016)

...rutgers.edu Lecture: Mon/Thurs 8:30 AM – 9:50 AM Room CON100 Recitation: (Check your section time) Course Website: http://blackboard.rutgers.edu COURSE DESCRIPTION Key quantitative techniques essential for analyzing and improving business operations. Spreadsheet modeling of business decision problems, both with and without data uncertainty. Linear and integer programming optimization models. Elementary applied probability modeling and Monte Carlo simulation. COURSE MATERIALS Required Textbook(s): Introduction to Management Science, 11/E (Available in Book Store) Bernard W. Taylor ISBN - 10: 0132751917 ISBN - 13: 9780132751919 Course items in Blackboard LEARNING GOALS AND OBJECTIVES LGO1. Students will understand and be able to apply Key quantitative techniques essential for analyzing and improving business operations A. Students will be able to use spreadsheet modeling of business decision problems, both with and without data uncertainty in preparing assignments, projects, or term papers in other courses in the functional area business disciplines as well as in research projects in the workplace. B. Students will be able to employ spreadsheet software (e.g. Microsoft Excel) as a tool to assist in the solution of business problems. C. Students will have an awareness of ethical issues in conducting research, in optimization problems and in the presentation of results. LGO2. Students will be able to understand risk from the perspective of ...

Words: 1655 - Pages: 7

Premium Essay

Doc 1

...[pic] |Quantitative Methods – MAT 540 | |Student Course Guide | |Prerequisite: MAT 300 | |INSTRUCTIONAL MATERIAL – Required | |( including all mandatory software) | |Taylor, B. M. (2010). Introduction to management science (10th ed.). Upper Saddle River, NJ: Pearson/Prentice Hall. | |Treeplan add-on for Excel. This software is available in the Open Lab at Strayer campuses, and can also be downloaded from the textbook's | |companion Website. http://wps.prenhall.com/bp_taylor_introms_10/112/28870/7390752.cw/-/7390754/index.html | | | |COURSE DESCRIPTION | |Applies quantitative methods to systems management...

Words: 2976 - Pages: 12

Premium Essay

Linear Optimization in Retail Settings

...studied mathematical formulas that would allow me to find the optimal solution. In this paper, I will use both linear optimization and goal programming to take a number of sets of data to analyze and discover the optimal use of various constraints of resources. The paper will be divided into three different sections with a specific method applied in the first two sections, and a final section to describe the possible errors in the solutions presented in the prior two sections. In the first section, I will use linear optimization to take various sets of resources and distribute them appropriately among various products to find the best allocation to achieve maximum revenues. Linear optimization is the name of a branch of applied mathematics that deals with solving optimization problems of a particular form.1 Put simply, linear programming is finding the best outcome possible using a linear mathematical model. The constraints are linear inequalities of the variables used in the cost function. This method is the best available and of the most use given the present goal of achieving the maximum revenue possible for the company. In the second section, I will use goal programming to take into account the second set of constraints that faces many companies—labor. Since ALDI was a private company that sold its 1 Schulze, Mark A. "Linear programming for optimization." Perceptive Scientific Instruments, Inc (1998). 3 own manufactured products, I also had to study the labor that was utilized...

Words: 3424 - Pages: 14

Free Essay

Assignment Timeline

...Arithmetic | Pages 58-93 Pages 94-131 | Quiz Chapter 3 Quiz Chapter 4 | Week 3June 19th –June 25th | Chapter 5: ProceduresChapter 6: Conditional Processing | Pages 132-179 Pages 180-228 | Quiz Chapter 5 Quiz Chapter 6 Programming Project 1 (Covers Chapters 1-6) | Week 4June 26th – July 2rd | Chapter 7: Integer Arithmetic Chapter 8: Advanced Procedures | Pages 229-269 Pages270-331 | Quiz Chapter 7 Quiz Chapter 8 | Week 5July 3rd – July 9th | Chapter 9: Strings and Arrays Chapter 10: Structures and Macros | Page 332-365 Pages 366-418 | Quiz Chapter 9 Quiz Chapter 10 Programming Project 2 (Covers Chapters 1-10 concentrating on the concepts learned in chapters 7-10) | July 4th Holiday | | | No Class | Week 6July 10th – July 12th | Comprehensive and covers all chapters (1-10) | | FINAL EXAM on Tuesday July 12th, 2011 |  Grade Sheet  | Graded Quizzes, Assignments, Projects & Exams | Possible Points | Assignment 1: Introduce Yourself | 10 | Quiz Chapter 1 | 10 | Quiz Chapter 2 | 10 | Quiz Chapter 3 | 10 | Quiz Chapter 4 | 10 | Quiz Chapter 5 | 10 | Quiz Chapter 6 | 10 | Quiz Chapter 7 | 10 | Quiz Chapter 8 | 10 | Quiz Chapter 9 | 10 | Quiz Chapter 10 | 10 | Programming...

Words: 324 - Pages: 2

Premium Essay

Masdw

...Commerce and Accountancy students which deals with the basic algebraic expressions, linear equations and inequalities, solving problems in a linear programming involving graphical method, simplex method, transportation method and assignment method, the break even analysis, the decision theory, business forecasting and inventory. GRADING SYSTEM: To obtain a passing mark, students should at least master 75% of the lesson. Computations of grades are shown below: For Prelim, Midterm and Final: |Class Standing (70%) |Examination (30%) | |Quizzes (20%) |Assignment (10%) |Project(20%) |Participation(20%) | | |Tentative Grade = Class standing + Examination | |Final Grade = Prelim (30%) + Midterm (30%) + Final (40%) | COURSE CONTENT: |Time Allotment |Unit Content |Specific Objectives |Teaching Methods |Activities / Projects / |Mode of Assessment | | |...

Words: 1015 - Pages: 5

Free Essay

Fdfglkd

...Final Time Table - Fall 2014 ( v 20141113-1130 ) CIIT_Lahore FA14-BEC-A (Semester 1) (DDP) 2 10:00 - 11:30 HUM-Huma Ijaz 1 8:30 - 10:00 Phy-Dr. Saif Ur Rehman 3 11:30 - 1:00 4 1:30 - 3:00 5 3:00 - 4:30 HUM-Dr. Musferah Mehfooz 6 4:30 - 6:00 7 6:00 - 7:30 Subjects Count English Physics for Chemical Comprehension and Engineers Composition Islamic Studies N-7 HUM-Huma Ijaz N-1 Math-Imran Zulfiqar Chem-Amjad Riaz Cheema Chemical Process Principles I N-11 Calculus I 2 Chemical Process Principles I 2 English Comprehension and Composition 2 Islamic Studies 2 Lab-Engineering Drawing 2 Lab-Physics for Chemical Engineers 2 Physics for Chemical Engineers 2 Tuesday Monday English Comprehension and Composition Calculus I N-7 N-12 Chem-Amjad Riaz N-11 Wednesday Phy-Dr. Saif Ur Rehman Physics for Chemical Chemical Process Engineers Principles I N-18 HUM-Dr. Musferah Mehfooz N-19 Math-Imran Zulfiqar Cheema Dr. Saif Ur Rehman / Dr. Ishrat Sultana Thursday Islamic Studies Calculus I Lab-Physics for Chemical Engineers N-15 N-3 Applied Physics Lab Chem-Muhammad Imran Rafiq Friday Lab-Engineering Drawing PC Lab-C Lessons/week 14 Timetable generated:11/13/2014 aSc Timetables Final Time Table - Fall 2014 ( v 20141113-1130 ) CIIT_Lahore FA14-BEC-B (Semester 1) (DDP) 2 10:00 - 11:30 Math-Syed Tahir Raza Rizvi 1 8:30 - 10:00 HUM-Huma Ijaz 3 11:30...

Words: 31997 - Pages: 128

Premium Essay

Feasibility Study

...software so the school only needs to pay a weekly salary. However once the Intranet has been put in place training costs and final project costs will need to be paid. Consultants No consultants aside from the group members will be required so this cost will not feature in the project cost analysis Research: While research into the development of High school intranets need to be made the costs will be factored into the weekly hours of the group. Research into the operations and general maintenance will also need to be undertaken but this cost has also been factored into the hours spent per week. Hardware and Software Requirements: It has been specified by the New Norfolk high school that the Intranet should work on their existing hardware and software so no extra hardware/software costs need to be considered. However as the project is limited to only 13 weeks and the project team has little experience in the programming skills the school requires. It has become apparent that the project team may need to externally source an Intranet program. Only a basic platform is required as the skills within the project team are sufficient to modify the Intranet to meet all the schools requirements. There is concern as to the platform on which the Intranet will be run as limited experience in networking and implementation skills are present within the project team. Change over costs This is a cost that is difficult to estimate. If the school is impressed by the Intranet...

Words: 3116 - Pages: 13

Premium Essay

Java Class

...Java Class MIS 304 is not a class for everyone. Not just any student should take the class. This class is structured to assist students in learning how to program using the Java language. This class does not make a student an expert in the language of Java, but instead gives the student the basic fundamentals needed to have practical use of the language and gives them a solid foundation upon which they can build if they choose to do so. The material covered in the class is adequate. Java can be a complex language to learn, but in MIS 304 one is taught the basics and nothing too detailed or complicated. The resources that are given to the students are very good. I know that the Java book used for the class is one of the best reference materials on Java that is on the market today. The lab facilities and proctors are also great resources. The only problem I feel that exists is that students don’t take advantage of the resources they have available. Students hardly look through their book for answering questions they might have. Also students hardly even bring their books to the lab when doing programs. They sometimes look for proctors to fix their problems instead of fixing it themselves. I think it should be emphasized to students that the proctors are not their to do the programs for them, but to rather help them figure out what is going wrong in their programs. Also it should be emphasized that the book should be with them when working on programs so that if questions or...

Words: 2075 - Pages: 9

Premium Essay

Business

...my skills and to climb my career ladder through continuous learning. Targeted Job * Expected Salary : SGD 2,200 (Negotiable) * Availability : Immediate Education Background * Bachelor of Information Technology University Of Newcastle, Australia (August 2011 – December 2013) (Major in Business Information Systems and Major in Software Development and Applications) * Attained Distinctions in Project Management and Final Year Project * Diploma in Business Studies PSB Academy, Singapore (August 2010 – July 2011) * Foundation Studies in Mechanical Engineering UNIVERSITI TECHNOLOGI PETRONAS, Perak, Malaysia (May 2009 – May 2010) * Intensive English Course UNIVERSITI TECHNOLOGI PETRONAS, Perak Malaysia (January 2009 – May 2019) * Matriculation Examination No.6 Basic Education High School, Mandalay, Myanmar (June 2007 – March 2008) * (Attained 4 Distinctions (Mathematics, Chemistry, Physics & Biology) out of 6 Subjects) Experience Project Name : HOTEL LOIKAW Reservation System Development Purpose : Final Year Project Duration : May 2013 – July 2013 Role : Programmer/ Analyst Team Size : 4 Members Language Platform : ASP.net, C#, SQL Server, HTML5, JavaScript, CSS & J-Query * Demonstrated Teamwork, Management, Problem Solving & Task Allocation * Scored ‘Distinction’ Grade Skills and Competencies Computers: * Operation Systems : MS Windows, Mac OS * Database : MSSQL, MySQL, MS Access ...

Words: 426 - Pages: 2

Premium Essay

Grad Audit

...Health, Safety & Environment Total Credit hour Grade Req CrH 3 3 3 1 1 1 1 3 3 2 2 2 22 Remarks COURSE COMPLETION STATUS Expected Final Semester Graduation, tick ( / ) Course Group Course Registration SEP 2015 Courses Course Group Course Registration JAN 2016 Courses Course Group Course Registration MAY 2016 Courses 3 3 3 3 3 3 3 3 3 3 3 3 3 39 MAJOR TCB1033 TCB1083 TCB2013 TCB2063 TCB2083 TCB3023 3 3 3 3 3 3 Internal ) ) ) Credit Hour Remarks Credit Hour Remarks Credit Hour Remarks Total Credit hour TECHNOLOGY CORE GCB2013 Statistics and Empirical Method GCB3013 Corporate Ethics SCB2053 System Analysis and Design GCB3093 Small Business and Entrepreneurship TCB2023 Operating Systems TCB1013 Structured Programming TCB1043 Computer Organization TCB2053 Object-Oriented Programming TCB2043 Software Engineering TCB3073 IT Project Management FCM1013 Discrete Mathematics SCB1033 Data and Information Management TCB1063 Algorithms & Data Structures Total Credit Hour Web Application Development Data Communications and Networking Human Computer Interaction Network Security Wireless Technology Distributed Computing SEP 2015 ( JAN 2016 ( MAY 2016 ( Total Credit hour Total Credit hour Page 1 of 2 TCB3343 ICB3017 ICB3027 TCB3012 TCB4014 Artificial Intelligence Industrial Training Industrial Project Final Year Project I Final Year Project II Total...

Words: 410 - Pages: 2

Free Essay

420 Syllabus

...Subedi Office: Corbly Hall 423 Office Hours: M 2:00 PM to 4:00 PM TR 10:00 AM – 12:30 PM and 1:45 PM – 2:00 PM R 6:00 PM – 6:30 PM Phone: 696 – 2676 E-Mail: subedi@marshall.edu I prefer you use the homepage of this course on blackboard to email me. You do not need any appointment to come to my office during the office hours. Course Description: This course is designed to be an applied; this is a level course in operational management. Learn basics issues pertaining to the operations management Learn important areas of operations management such as inventory management, project management, MRP etc Learn basics of decision making tools such as forecasting and linear programming This course is an attempt to blend quantitative reasoning with practical decision-making applications. Prerequisite: It is the student's responsibility to be aware of and meet all prerequisites for LCOB courses. By remaining in the course beyond the regular registration period, the student certifies that he/she has met all prerequisites. Students registered for courses without having met prerequisites will be considered to have committed Academic Dishonesty as defined by the Marshall University Student Handbook. Sanctions may include a grade of "F" in the course for which the student has not met the prerequisite or suspension from the university. The dean's office reserves the right...

Words: 1500 - Pages: 6

Free Essay

Wsu Ee416 Term Paper

...[pic] Automated Greenhouse Lighting Final Report [pic] Duration: January 11, 2010 – April 23, 2010 Course: EE416 Electrical Engineering Design Instructor: M. A. Osman School of EECS Richland, WA 99354 Table of Contents Executive Summary 3 Introduction 3 Project Description 4 Target Technical Specifications 5 Setbacks 6 New Scope and Direction 7 Project Management 9 Modeling, Simulation, and Engineering Analysis 11 Conclusion 16 Recommendations and Future Work 16 References 17 Executive Summary This report focuses on the activities that Team Rainier has made between January 11 and April 23, 2010. The team was originally updating the palletizing process for J. Lieb Foods. Currently J. Lieb Foods has a rotary operated control system that controls the Programmable Logic Controller (PLC) which in-turn operates the palletizer. Team Rainier was updating the control system to a touch screen control for the operators and an upgraded PLC to control the palletizer. Through the process of economic analysis J. Lieb had selected the PanelMate 1000 as their touch screen and the quantum as the PLC. Due to recent developments with J. Lieb the project stalled and now has a different scope and direction. Team Rainier has been in contact with Dr. Allan Felsot of the Viticulture and Enology Program at Washington State University Tri-Cities. Dr. Felsot is the director of the green house at the university campus. Currently...

Words: 3336 - Pages: 14