Free Essay

Introduction to Problem Solving and Algorithm Design

In:

Submitted By frodriguez18
Words 311
Pages 2
CMIS 102 4060 Introduction to Problem Solving and Algorithm Design

HOMEWORK 2

Declare CPUCost As Float
Declare CaseCost As Float
Declare PowerSupplyCost As Float
Declare Motherboard As Float
Declare HardDriveCost As Float
Declare RAMCost As Float
Declare DVDCost As Float
Declare SoundCardCost As Float
Declare MonitorCost As Float
Declare GraphicsCardCost As Float
Declare OperatingSystem Cost As Float
//Prompt for and input the computer price:
Write “Enter the computer price:”
Input ComputerPrice
Call Compute_CPU_Cost module
Call Compute_Case_Cost module
Call Compute_Power_Supply_Cost module
Call Compute_Motherboard_Cost module
Call Compute_Hard_Drive_Cost module
Call Compute_RAM_Cost module
Call Compute_DVD_Cost module
Call Compute_Monitor_Card_Cost module
Call Compute_Graphics_Card_Cost module
Call Compute_Operating_System_Cost module
End Program
Declare CPUCost as Character
//Display the menu and input user selection:
Write “S – Intel i7”
Write “E – Intel i5”
Write “D – Intel i3”
Write “Selection”
Input CPU Choice
Select Case of CPU Choice
Case “S”:
Set CPUCost = 319
Break
Case “E”:
Set CPUCost = 229
Break
Case “D”:
Set CPUCost = 119
Break
Default:
Write” Invalid Selection”
End Case
Declare CaseCost as Character
//Display the menu and input user selection:
Write “V – Thermaltake V3”
Write “C – NZXT Guardian”
Write “L – Cooler Master Elite 430”
Write “Selection”
Input Case Choice
Select Case of Case Choice
Case “V”:
Set CPUCost = 50
Break
Case “C”:
Set CPUCost = 60
Break
Case “L”:
Set CPUCost = 70
Break
Default:
Write” Invalid Selection”
End Case
Declare PowerSupplyCost as Character
//Display the menu and input user selection:
Write “R – Corsair Builder Series CX 600W”
Write “D Logisys Corp. 550W”
Write “T – Corsair CX750 Builder Series ATX 80”
Write “Selection”
Input Case Choice
Select Case of Case Choice
Case “R”:
Set CPUCost = 70
Break
Case “D”:
Set CPUCost = 27
Break
Case “T”:
Set CPUCost = 90
Break
Default:
Write” Invalid Selection”
End Case
Declare Shipping Charge, Selling Price As Float
Set ShippingCharge = 15
Set SellingPrice = CPUCost + CaseCost + PowerSupplyCost + Motherboard + HardDriveCost + RAMCost + DVDCost + SoundCardCost + MonitorCost + GraphicsCardCost + OperatingSystem
Write “The total selling price for your Computer is $” + SellingPrice

Similar Documents

Premium Essay

Algorithms In Computer Science

...Abstract—Algorithms are commonly perceived as a difficult subject, which is quite an irony as they have a fundamental role in computer science. Failure to master this subject will inhibit students’ capabilities as they advance to higher levels. Algorithm visualization, as an effort to overcome the problem, has been growing towards gameful visualization recently that is presumed to be able to engage learners longer and more intensely. However, integrating algorithm visualization, game elements, and instructional design is not a trivial task as it requires a careful design. Hence, a conceptual model of how algorithm learning instructions, algorithm visualization, and gamification improve learning outcomes was developed. While instructional design...

Words: 753 - Pages: 4

Free Essay

C Language

...Handout: Problem Solving and 'C' Programming Version: PSC/Handout/1107/1.0 Date: 16-11-07 Cognizant 500 Glen Pointe Center West Teaneck, NJ 07666 Ph: 201-801-0233 www.cognizant.com Problem Solving and C Programming TABLE OF CONTENTS About this Document ....................................................................................................................6 Target Audience ...........................................................................................................................6 Objectives .....................................................................................................................................6 Pre-requisite .................................................................................................................................6 Session 2: Introduction to Problem Solving and Programming Languages ...........................7 Learning Objectives ......................................................................................................................7 Problem Solving Aspect ...............................................................................................................7 Program Development Steps .......................................................................................................8 Introduction to Programming Languages ...................................................................................14 Types and Categories of Programming Languages...

Words: 4320 - Pages: 18

Premium Essay

Hai, How Are U

...UNIVERSITY OF KERALA B. TECH. DEGREE COURSE 2008 ADMISSION REGULATIONS and I  VIII SEMESTERS SCHEME AND SYLLABUS of COMPUTER SCIENCE AND ENGINEERING B.Tech Comp. Sc. & Engg., University of Kerala 2 UNIVERSITY OF KERALA B.Tech Degree Course – 2008 Scheme REGULATIONS 1. Conditions for Admission Candidates for admission to the B.Tech degree course shall be required to have passed the Higher Secondary Examination, Kerala or 12th Standard V.H.S.E., C.B.S.E., I.S.C. or any examination accepted by the university as equivalent thereto obtaining not less than 50% in Mathematics and 50% in Mathematics, Physics and Chemistry/ Bio- technology/ Computer Science/ Biology put together, or a diploma in Engineering awarded by the Board of Technical Education, Kerala or an examination recognized as equivalent thereto after undergoing an institutional course of at least three years securing a minimum of 50 % marks in the final diploma examination subject to the usual concessions allowed for backward classes and other communities as specified from time to time. 2. Duration of the course i) The course for the B.Tech Degree shall extend over a period of four academic years comprising of eight semesters. The first and second semester shall be combined and each semester from third semester onwards shall cover the groups of subjects as given in the curriculum and scheme of examination ii) Each semester shall ordinarily comprise of not less than 400 working periods each of 60 minutes duration...

Words: 34195 - Pages: 137

Premium Essay

Tiles

...80840-6234 {Martin.Carlisle,Jeffrey.Humphries,Steven.Hadfield}@usafa.af.mil ABSTRACT When students are learning to develop algorithms, they very often spend more time dealing with issues of syntax than solving the problem. Additionally, the textual nature of most programming environments works against the learning style of the majority of students. RAPTOR is a flowchart-based programming environment, designed specifically to help students visualize their algorithms and avoid syntactic baggage. RAPTOR programs are created visually and executed visually by tracing the execution through the flowchart. Required syntax is kept to a minimum. Students preferred using flowcharts to express their algorithms, and were more successful creating algorithms using RAPTOR than using a traditional language or writing flowcharts without RAPTOR. Categories and Subject Descriptors D.1.7 [Visual Programming] General Terms Languages, Algorithms. Keywords Flowcharts, Visual Programming, Programming Environments, Problem Solving. 1. INTRODUCTION Shackelford and LeBlanc[6] previously observed that the use of a particular programming language in an introduction to computing course tends to “annoy and distract attention from the core issue of algorithmic problem solving.” In our experience, it also distracts attention from the teaching of algorithmic problem solving. Instructors spend class time where they expect students to have the most difficulty. Consequently, they often focus on...

Words: 3019 - Pages: 13

Premium Essay

It- 3rd Year

...E-COMMERCE (TIT-501) UNIT I Introduction What is E-Commerce, Forces behind E-Commerce Industry Framework, Brief history of ECommerce, Inter Organizational E-Commerce Intra Organizational E-Commerce, and Consumer to Business Electronic Commerce, Architectural framework Network Infrastructure for E-Commerce Network Infrastructure for E-Commerce, Market forces behind I Way, Component of I way Access Equipment, Global Information Distribution Network, Broad band Telecommunication. UNIT-II Mobile Commerce Introduction to Mobile Commerce, Mobile Computing Application, Wireless Application Protocols, WAP Technology, Mobile Information Devices, Web Security Introduction to Web security, Firewalls & Transaction Security, Client Server Network, Emerging Client Server Security Threats, firewalls & Network Security. UNIT-III Encryption World Wide Web & Security, Encryption, Transaction security, Secret Key Encryption, Public Key Encryption, Virtual Private Network (VPM), Implementation Management Issues. UNIT - IV Electronic Payments Overview of Electronics payments, Digital Token based Electronics payment System, Smart Cards, Credit Card I Debit Card based EPS, Emerging financial Instruments, Home Banking, Online Banking. UNIT-V Net Commerce EDA, EDI Application in Business, Legal requirement in E -Commerce, Introduction to supply Chain Management, CRM, issues in Customer Relationship Management. References: 1. Greenstein and Feinman, “E-Commerce”, TMH 2. Ravi Kalakota, Andrew Whinston...

Words: 2913 - Pages: 12

Premium Essay

Optimization 7th Edition Sollution

...aypolat@ku.edu.tr gulermis@ku.edu.tr Office Hours Office Location Course Description Introduction to modeling with integer variables and integer programming; network models, dynamic programming; convexity and nonlinear optimization; applications of various optimization methods in manufacturing, product design, communications networks, transportation, supply chain, and financial systems. Course Objectives The course is designed to teach the concepts of optimization models and solution methods that include integer variables and nonlinear constraints. Network models, integer, dynamic and nonlinear programming will be introduced to the students. Students will be exposed to applications of various optimization methods in manufacturing, product design, communications networks, transportation, supply chain, and financial systems. Several different types of algorithms will also be presented to solve these problems. The course also aims to teach how to use computer programs such as Matlab and GAMS to solve mathematical models. Learning Outcomes Students are expected to model real life problems using mathematical models including integer variables and nonlinear equations. Students will be able to apply mathematical modeling techniques such as dynamic, integer and nonlinear programming to different types of problems. They will also be able to model and solve transportation and network problems such as shortest path, maximum flow and minimum cost network flow...

Words: 768 - Pages: 4

Free Essay

Ds Java

...A Practical Introduction to Data Structures and Algorithm Analysis Third Edition (Java) Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, VA 24061 April 16, 2009 Copyright c 2008 by Clifford A. Shaffer. This document is the draft of a book to be published by Prentice Hall and may not be duplicated without the express written consent of either the author or a representative of the publisher. Contents Preface xiii I Preliminaries 1 1 Data Structures and Algorithms 1.1 A Philosophy of Data Structures 1.1.1 The Need for Data Structures 1.1.2 Costs and Benefits 1.2 Abstract Data Types and Data Structures 1.3 Design Patterns 1.3.1 Flyweight 1.3.2 Visitor 1.3.3 Composite 1.3.4 Strategy 1.4 Problems, Algorithms, and Programs 1.5 Further Reading 1.6 Exercises 3 4 4 6 8 12 13 14 15 16 17 19 21 2 Mathematical Preliminaries 2.1 Sets and Relations 2.2 Miscellaneous Notation 2.3 Logarithms 2.4 Summations and Recurrences 25 25 29 31 33 iii iv Contents 2.5 2.6 2.7 2.8 2.9 3 II 4 Recursion Mathematical Proof Techniques 2.6.1 Direct Proof 2.6.2 Proof by Contradiction 2.6.3 Proof by Mathematical Induction Estimating Further Reading Exercises Algorithm Analysis 3.1 Introduction 3.2 Best, Worst, and Average Cases 3.3 A Faster Computer, or a Faster Algorithm? 3.4 Asymptotic Analysis 3.4.1 Upper Bounds 3.4.2 Lower Bounds 3.4.3 Θ Notation 3.4.4 Simplifying...

Words: 30587 - Pages: 123

Free Essay

C++ Objects Solutions

...Program, p. 24 Predicting the Output of Problem 30, p. 24 Solving the Candy Bar Sales Problem, p. 25 Using cout to Display Output, p. 32 Assignment Statements, p. 59 Arithmetic Operators, p. 61 Solving the Restaurant Bill Problem, p. 72 Using cin to Read Input, p. 75 Evaluating Mathematical Expressions, p. 81 Combined Assignment Operators, p. 102 Solving the Stadium Seating Problem, p. 151 Using an if Statement, p. 162 Using an if/else Statement, p. 172 Using an if/else if Statement, p. 175 Solving the Time Calculator Problem, p. 236 The while Loop, p. 249 The for Loop, p. 263 Nested Loops, p. 277 Solving the Ocean Levels Problem, p. 299 Defining and Calling Functions, p. 306 Using Function Arguments, p. 316 Value-Returning Functions, p. 326 Solving the Markup Problem, p. 380 Creating a Class, p. 391 Creating and Using Class Objects, p. 393 Creating and Using Structures, p. 436 Solving the Car Class Problem, p. 480 Accessing Array Elements, p. 487 Passing an Array to a Function, p. 517 Two-Dimensional Arrays, p. 526 Solving the Chips and Salsa Problem, p. 567 Performing a Binary Search, p. 580 Sorting a Set of Data, p. 587 Solving the Lottery Winners Problem, p. 616 (continued on next page) Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 LOCATION OF VIDEONOTES IN THE TEXT Chapter 10 Pointer Variables, p. 621 Dynamically Allocating an Array, p. 645 Solving the Days in Current Month Problem, p. 676 (continued) Chapter...

Words: 11246 - Pages: 45

Free Essay

Gs-1140 Pst Micromouse Report 3

...Introduction The evolution of autonomous robots has inspired competitions worldwide, including the most notorious Micromouse Competition. This competition has existed for over 30 years in the United States and hasn’t changed much since the beginning. The goal is simple: the robot must navigate from one corner to the center as fast as possible. The actual final score is comprised of the total time in the maze and the time of the fastest run. The various components include techniques to streamline the methodology and make a proficient automated robot. Maze Solving Strategy The maze solving strategy is comprised of an algorithm. An algorithm is a step-by-step problem-solving procedure, especially an established, recursive computational procedure for solving a problem in a finite number of steps. The implementation The Group chose was a revised version of the bellman flooding algorithm. The algorithm requires around 256 X 3 bytes of memory. The selected microcontroller for implementation had only 256 KB of memory. We need to use software that has exceptional amounts of RAM and ROM memories. To solve the whole maze you will need to set the starting cell to the first cell in the maze. If you want to reverse the path traveled by the robot then you would set the target to the first cell, and the starting cell would then be the center or your current location. The problem statement has been simplified to three rules which we will follow to direct our robot to the center of the maze...

Words: 1568 - Pages: 7

Free Essay

A Paper

... |Course Syllabus | | |Information Systems & Technology | | |PRG/211 Version 4 | | |Algorithms and Logic for Computer Programming | Copyright © 2012, 2011, 2010 by University of Phoenix. All rights reserved. Course Description This course provides students with a basic understanding of programming development practices. Concepts covered include the application of algorithms and logic to the design and development of procedural and object oriented computer programs to address the problem solving requirements associated with business information systems. This course will cover procedural programming concepts including data types, controls structures, functional decomposition, arrays, and files, classes and objects. Policies Faculty and students/learners will be held responsible for understanding and adhering to all policies contained within the following two documents: • University policies: You must be logged into the student website to view this document. • Instructor policies: This document is...

Words: 1735 - Pages: 7

Free Essay

The Research of Robot Path Planning System

...University, P. R. China Abstract: First we analyze all of the aspects of the algorithm in detail, including environmental modeling, path initialization, the fitness function design, the operator design, the analysis and selection of algorithm parameters. Then, use the MATLAB write, simulate and debug the program, continually analyze the simulation result in static environment. Simulation results showed that genetic simulated annealing algorithm in a variety of obstacles environment can plan out an optimal or near-optimal path effectively, which demonstrate the effectiveness of the algorithm. Key words: Path planning、Genetic algorithms、Simulated annealing algorithms Introduction Robot is the agent which can stay in the physical state, is a automatic or semi-automatic machine to perform work. It can be perceived by the sensor surroundings in the surrounding environment to make certain reactions. Robot is the popular trend of modern scientific and technological research in the 21st century which will increasingly play an important role in reflecting its importance. Since the invention of the world's first generation of robots, robots applications in various fields widely, the ability to interact with the environment are increasing. Robots need to focus on the following issues specially, namely: determine where it is, where to go, how to get. The third problem is the so-called path planning problem, it is an important branch in the field of robotics research, mainly refers to...

Words: 966 - Pages: 4

Free Essay

Case Study

...Multimedia Software Engineering Computer Networks Computer Graphics and Multimedia Lab Advanced Operating System Internet programming and Web Design Data Mining and Warehousing Internet programming and Web Design Lab Project Work and Viva Voce Total University Examinations Durations Max in Hrs Marks 3 100 3 100 3 100 3 100 3 100 3 3 3 3 100 100 100 100 100 1000 II For project work and viva voce (External) Breakup: Project Evaluation : 75 Viva Voce : 25 1 Anx.31 J - M Sc CS (SDE) 2007-08 with MQP Page 2 of 16 YEAR – I PAPER I: ADVANCED COMPUTER ARCHITECTURE Subject Description: This paper presents the concept of parallel processing, solving problem in parallel processing, Parallel algorithms and different types of processors. Goal: To enable the students to learn the Architecture of the Computer. Objectives: On successful completion of the course the students should have: Understand the concept of Parallel Processing. Learnt the different types of Processors. Learnt the Parallel algorithms. Content: Unit I Introduction to parallel processing – Trends towards parallel processing – parallelism in uniprocessor Systems – Parallel Computer structures – architectural classification schemes – Flynn’ Classification – Feng’s Classification – Handler’s Classification – Parallel Processing Applications. Unit II Solving problems in Parallel: Utilizing Temporal Parallelism – Utilizing Data Parallelism –...

Words: 3613 - Pages: 15

Premium Essay

Principles of Management

...together with their implementation in the C++ Programming language. This course should serve as a foundation for students in the Computer Science, Information Technology, and Computer Technology Program. None BSIT/BSCS/ACT Prerequisite: Department/Program: GENERAL OBJECTIVES: At the end of this course, the students should be able to: 1. 2. 3. 4. 5. 6. To learn the components in problem solving Explore the strategies in problem solving in relation to procedural programming Analyze problems Design algorithms to solve problems Implement algorithms in a programming language Test programming solutions to problems Preliminary Grading Period Time Table Specific Objectives 1stand 2ndWeek Introduction in Programming Learn how to analyze and design a program To understand the basic of Programming Topic Algorithms Programming Language Levels Steps in writing a Program Programming Techniques  Pseudocode  Flowchart Teaching-Learning Strategies Lecture with Hands-On Exercises Tools/Aid Blackboard Handouts Multimedia Presentation Evaluation Assignment Recitation Seatwork Quizzes Machine Problem or Case Study 3rdWeek Introducing C++ Determine how C++ originate Remarks about Programming Study the aspect of Programming The Origin of C++ Know how to construct a Simple Input, Output and Assignment program using cout and cin Discuss variable in more detail Simple Flow of Control Determine how variables are Preliminary Remarks about Program always of a particular data type...

Words: 952 - Pages: 4

Free Essay

Xxxx

...iii Monday, July 16, 2001 1:44 PM PREFACE Welcome to the third edition of Data Abstraction and Problem Solving with C++: Walls and Mirrors. Since the publication of the second edition, we all have gained experience with teaching data abstraction in an objectoriented way using C++. This edition reflects that experience and the evolution that C++ has taken. This book is based on the original Intermediate Problem Solving and Data Structures: Walls and Mirrors by Paul Helman and Robert Veroff (© 1986 by The Benjamin/Cummings Publishing Company, Inc.). This work builds on their organizational framework and overall perspective and includes technical and textual content, examples, figures, and exercises derived from the original work. Professors Helman and Veroff introduced two powerful analogies, walls and mirrors, that have made it easier for us to teach—and to learn—computer science. With its focus on data abstraction and other problem-solving tools, this book is designed for a second course in computer science. In recognition of the dynamic nature of the discipline and the great diversity in undergraduate computer science curricula, this book includes comprehensive coverage of enough topics to make it appropriate for other courses as well. For example, you can use this book in courses such as introductory data structures or advanced programming and problem solving. The goal remains to give students a superior foundation in data abstraction, object-oriented programming...

Words: 6423 - Pages: 26

Premium Essay

Optimization of Heat Exchanger Network

...September 2010 Accepted 26 October 2010 Available online 2 November 2010 Keywords: Heat exchanger network (HEN) Optimization Genetic algorithm Pinch Analysis Method Mathematical Optimization Method Sequential Quadratic Programming (SQP) a b s t r a c t In this paper, a new method is presented for optimization of heat exchanger networks making use of genetic algorithm and Sequential Quadratic Programming. The optimization problem is solved in the following two levels: 1- Structure of the optimized network is distinguished through genetic algorithm, and 2- The optimized thermal load of exchangers is determined through Sequential Quadratic Programming. Genetic algorithm uses these values for the determination of the fitness. For assuring the authenticity of the newly presented method, two standard heat exchanger networks are solved numerically. For representing the efficiency and applicability of this method for the industrial issues, an actual industrial optimization problem i.e. Aromatic Unit of Bandar Imam Petrochemistry in Iran is verified. The results indicate that the proposed multistage optimization algorithm of heat exchanger networks is better in all cases than those obtained using traditional optimization methods such as Pinch Analysis Method and Mathematical Optimization Method. Ó 2010 Elsevier Ltd. All rights reserved. 1. Introduction Optimization of heat exchanger network either with the purpose of minimizing utilities and number of exchangers or with...

Words: 4334 - Pages: 18