Free Essay

Unit 6 Pt1420 Introprogramming

In: Computers and Technology

Submitted By dfrye7
Words 533
Pages 3
Delvon Frye
7/26/2016
PT1420
Unit 6 Assignment
Algorithm Workbench pg. 159 6-10
6. Select number
Case 1:
Display “You selected A.”
Case 2:
Display “You selected 2.”
Case 3:
Display “You selected 3.”
Case 4: Display “You selected 4.” Default:
Display “Not good with numbers, eh?”
End Select
7. If Speed 24 > and Speed < 56
Display “Speed is normal.”
Else
Display “Speed is abnormal.”
8. If points are < 9 and >51
Display “Invalid points.”
Else
9. Display “Valid points.”
Select testMonth
Case value_1:
Display “January has 31 days.”
Case value_2:
Display “February has 28 days.”
Case value_3:
Display “March has 31 days.”
Default:
Display “Invalid selection.” End select
10. If hours==10 THEN
Programming Exercises 5 and 8 pg. 160
5. Dim color1 as string
Dim color2 as string
Display (“Please enter two primary colors.”)
Display (“The color you made is Purple”) Else Display (“The color you made is Purple”) Else
Display (“The color you made is Orange”)
Else
Display (“The color you made is Orange”)
Else
Display (“The color you made is Green”)
Else
Display (“The color you made is Green”)
Else
If color1 = else or color2 = else then
Display (“You failed to enter a valid color!”)
End if

8. //This is a program asks the user to enter the number of coins required to make exactly one dollar.
//Declare the variables
Declare Real pennies
Declare Real nickels
Declare Real dimes
Declare Real quarters
Declare Real dollars
//Get input from the user
Display “Enter the number of pennies :” Input pennies Display “Enter the number of nickels :”
Input nickels
Display “Enter the number of dimes :” Input dimes
Display “Enter the number of quarters :”
Input quarters
//convert pennies, nickels, dimes, quarters to dollars
Set dollars = dollars + pennies S et dollars = dollars + (nickels * 5) Set dollars = dollars + (dimes * 10)
Set dollars = dollars + (quarters * 25
If dollars == 100 Then
Display “Congratulations for winning the game.”
Else
If dollars < 100 Then
Display “The amount entered was less than one dollar.”
Else
Display “The amount entered was more than one dollar.”
EndIf
Unit 6 Research Assignment: Advantages and Disadvantages of using Case Structures

Advantages:
1.You can create logic flows; in which is a method used to make the reading easier for the reader.
2.Because they are written in natural language, use cases are easy to understand and provide an excellent way for communicating with customers and users.
3.Static depth, in which “if” can be set to however amount the user wants.
4.Low CPU overhead.
5.You can insert certain captions using “< >//”
6.As a user-centered technique, use cases help ensure that the correct system is developed by capturing the requirements from the user's point of view.
Disadvantages:
1.If it is case specific, in which a case can’t be re-used.
2.If it is static, in which the user will not be able to create most implements.
3.The “Bloated syntax” takes space, in which case is more functional when used in an equation.
4.It takes a lot of maintenance, because for any change requires fixing throughout the entire structure.
5.Most programmers use it; which means that whatever you’re.…...

Similar Documents

Premium Essay

Unit 1 Pt1420

...Unit 1 Research 1 PT1420 In the 1970s the programming language that was most popular was Pascal. Pascal was designed in 1968-69 but published in 1970. Niklaus Wirth created the Pascal language to “1) make available a language suitable for teaching programming as a systematic discipline based on fundamental concepts clearly by the language, and 2) to define a language whose implementations could be both reliable and efficient on then-available computers. In 1972 the C programming language was developed by Dennis Ritchie. C was created to work with the system Unix. “Unix gives C such advanced features as dynamic variables, multitasking, interrupt handling, forking, and strong, low-level, input-output. Because of this, C is very commonly used to program operating systems such as Unix, Windows, the MacOS, and Linux.” In the 1980s the popular programming language was C++. C++ was developed at Bell Laboratories. C++ is a general purpose multi-paradigm spanning compiled language that has both high-level and low-level languages’ features. It was started as an enhancement to the C programming language, Bjarne Stroustrup in 1979. In the 1990s Java was the popular programming language. It was created in 1991 developed by James Gosling at Sun Microsystems and release in 1995. In the 2000s Visual Basic (VB) was popular in the programming world. VB was developed from BASIC which was originally developed in 1964 by John Kemeny and Thomas Kurts. VB is a Microsoft programing language and......

Words: 261 - Pages: 2

Free Essay

Pt1420 Unit 3

...Short Answer: 5. The variable’s name and the variable’s data type must be specified in a variable declaration. 6. The value of an uninitialized variable is either 0 or the value that happens to be stored in its memory location. Algorithm Workbench: 3. a. Set b = 2 + a b. Set a = b * 4 c. Set b = a / 3.14 d. Set a = b – 8 4. a. 12 b. 4 c. 2 d. 6 5. Declare Real cost 6. Declare Int total = 0 7. Set count = 27 8. Set total = 10 + 14 9. Set due = downPayment – total 10. Set totalFee = subtotal * .015 Programming Exercise: 6. Declare Real purchaseAmt Constant Real STATE_TAX = 0.04 Constant Real COUNTY_TAX = 0.02 Declare Real totalTax Declare Real totalSale Display “Enter the amount of purchase” Input purchaseAmt Set stateTax = purchaseAmt * stateTax Set countyTax = purchaseAmt * countyTax Set totalTax = stateTax + countyTax Set totalSale = purchaseAmt * totalTax Display “The amount of your purchase is $”, purchaseAmt, Display “The state tax is $”, stateTax Display “The county tax is $”, countyTax Display “total tax is $”, totalTax Display “The total of the sale is $” totalSale 8. Declare Real mealAmt Constant Real TIP = 0.15 Constant Real SALES_TAX = 0.07 Display Real taxTotal Declare Real totalSale Display “Enter the price of the meal” Input mealAmt Set salesTax = mealAmt * salesTax Set tip = mealAmt * tip Set totalTax = salesTax + tip Set totalSale =......

Words: 254 - Pages: 2

Premium Essay

Pt1420 Unit 4 Assignment

...Unit 4 Assignment Short Answers 1. Modules allow the programmer to write an operation once, and then be able to execute it any time needed later in the code. 2. Header – The starting point of the module Body- The list of statements that belong to the module 3. The program returns to the memory address just after from where the module was called, and continues to execute 4. A local variable is a variable that is declared from within the module. Only statements in that module can access it. 5. A local variable’s scope begins at the variable’s declaration and ends at the end of the module in which it is declared. 6. Passing an argument by value is a one-way communication from the main program to the module. Changes to the parameter variable inside the module do not affect the argument in the calling part of the program. Passing an argument by reference is a two-way communication from the main program to the module and it allows modification of the variable in the calling program 7. Global variables make a program difficult to debug because any statement in a program file can change the value of a global variable. If you find that the wrong value is being stored in the global variable, you have to track down every statement that accesses it to determine where the bad value is coming from. 1. Module timesTen (integer originalNumber by value) Set a = originalNumber * 10 Input a Display “The answer is “, a 5. Module getNumber (integer......

Words: 483 - Pages: 2

Premium Essay

Pt1420 Unit 1

...“Unit 1 Assignment 1” ITT Technical Institute Intro to Programming – PT1420 Unit 1 Assignment 1 Short Answer Questions 1. Why is the CPU the most important component in a computer? The reason the CPU is the most important component in a computer is because without the CPU you can’t run any software. 2. What number does a bit that is turned on represent? What number does a bit that is turned off represent? The number in a bit that represents a turned on position is 1. The number in a bit that represents a turned off position is 0. 3. What would call a device that works with binary data? A digital device is a device that works with binary data. 4. What are the words that make up a high-level programming language called? Keywords or Reserved Words are words that make up a high-level programming language. 5. What are short words that are used in assembly language called? Mnemonics are short words that are used in assembly language. 6. What is the difference between a compiler and an interpreter? The difference between a compiler and an interpreter is that a compiler translates high-level language into separate machine language program while an interpreter translates AND executes the instructions in a high-level language program. 7. What type of software controls the internal operations of the computer’s hardware? An operating system controls the internal operations of the computer’s hardware. Unit 1 Research Assignment 1 * What......

Words: 1534 - Pages: 7

Premium Essay

Pt1420 Unit 8

...HomeworkUnit 8 Assignment Short Answer 6-10 page 213 6. What is an infinite loop? Write the code for an infinite loop. An infinite loop is a sequence of instructions in a computer program which loops endlessly. While keepgoing ==”y” 7. A For loop looks like what other loop in a flowchart? It looks the while loop. 8. Why is it critical that accumulator variables are properly initialized? Accumulator variables should be properly initialized to be sure that it does not contain garbage. 9. What is the advantage of using a sentinel? The advantage of a sentinel automatically marks the end of the list for you. 10. Why must the value chosen for use as a sentinel be carefully selected? It must be carefully selected to be sure it doesn’t get mistaken as a regular value in the list. Algorithm 3, 4, 9, and 10 page 213 3. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000 For(int i = 0; i <=1000; i += 10) System.out.print(i + “,”); 4. Design a loop that asks the user to enter a number. The loop should iterate 10 times and keep a running total of the numbers entered. Scanner k = new Scanner(System.in); int total = 0; For(int i = 0; i < 10; i ++){ System.out.println(“Enter a number:”); Total += k.nextlnt();} 9. Convert the following While loop to a For loop: Declare Integer count = 0 While count < 50 Display " The count is ", count Set count = count + 1 End While 10. Convert the following For loop......

Words: 299 - Pages: 2

Premium Essay

Pt1420 Unit 2 Research

...Kelli Okuly PT1420 Unit 2 Research Assignment 12-5-2014 Variable naming conventions vary from program to program. In Visual Basic the variable must begin with a letter and you cannot use a space, period (.), or the characters !, @, &, $, # in the name. Visual Basic variable names must be under 255 characters long. You shouldn't use any names that are the same as the functions, statements, and methods in Visual Basic. You end up shadowing the same keywords in the language. To use a basic language function, statement, or method that conflicts with an assigned name, you must explicitly identify it. Precede the fundamental function, statement, or method name with the name of the associated type library. For example, if you have a variable called “Left”, you can only use the “Left” function using “VBA.Left”. In Python, variables must begin with a letter or underscore (_). Other characters can be letters, numbers, or the underscore. Python variables are case sensitive and can be any length, within reason. There are several keywords in Python that are reserved for other functions and cannot be used as variables. For example; print, def, from, not, and return. Variables in Java are referred to as Identifiers. In Java the variable must begin with a letter, an underscore, or a dollar sign ($) although a letter is typically what is used. The other characters may be letters or numbers, no spaces or special characters are allowed. Java identifiers can be any length......

Words: 405 - Pages: 2

Free Essay

Unit 6

...Unit 6 Assignment Lissete Duran-Pereira May 29, 2015 Kaplan University MT220-01: Global Business Here at Zip 6 we are continuously looking for new areas throughout the world to increase our global presence. We have been recently approach by a Jordanian soft drink manufacturer that is smaller in size and has no experience in the global market. This manufacturer is said to have ties to the Jordanian Royal family. Although the “ties” have not been defined in the proposal I believe this should be investigated to fully understand the relationship with the royal family. As Ravi is a person of Iranian descent, he feels that it would be a benefit to create jobs and provide financial stability to the economy. In my researches of the Lebanese economy I have found out that they run a free market economy with a strong laissez-faire commercial tradition. I have uncovered some issues that may pose a threat for the global image of the Zip 6 organization. This area suffers from corruption, arbitrary licensing decisions, complex customs procedures, high taxes and tariffs, and finally weak intellectual property rights. Some of these issues that I see with the current state of the economy could be something that is discharged because of the ties with the royal family. As a world leader in soft drink manufacturing, I believe that these economic risks are a potential threat to the Zip 6 organization. One issue that I see as a huge problem is the weak intellectual property......

Words: 383 - Pages: 2

Free Essay

Pt1420 Unit 2

...“Enter your telephone number” Input telephone number Display “Enter your college major” Input college major 4. Total Purchase Display “Enter the first item” Input Item 1 Display “Enter the second item” Input Item 2 Display “Enter the third item” Input Item 3 Display “Enter the forth item” Input Item 4 Display “Enter the fifth item” Input item 5 Set subtotal = item1+item2+item3+item4+item5 Set sales tax = (subtotal*.06) Set total = subtotal + sales tax Display “Your Subtotal is”, subtotal, “The sales tax is”, sales tax, “Your total is”, total Unit 2 Research 1 Java 1. Variable names are case-sensitive. 2. A variable’s name can be any legal identifier. 3. It can contain Unicode letter, Digits and Two Special Characters such as Underscore and dollar Sign. 4. Length of Variable name can be any number. 5. Its necessary to use Alphabet at the start (however we can use underscore , but do not use it ) 6. Some auto generated variables may contain ‘$‘ sign. But try to avoid using Dollar Sign. 7. White space is not permitted. 8. Special Characters are not allowed. 9. Digit at start is not allowed. 10. Subsequent characters may be letters, digits, dollar signs, or underscore characters. 11. Variable name must not be a keyword or reserved word. Visual Basics 1. You must use a letter as the first character. 2. You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name. 3. Name can't exceed 255 characters in......

Words: 676 - Pages: 3

Premium Essay

Pt1420 Unit 10

...Timothy Knox 8/21/2015 Dr. North Unit 10 10.1.1 TCP can connect two hosts with the capability to retransmit dropped packets, maintain ordering, and check for errors. A TCP connection is established with a three-way handshake in which a connection is established and acknowledged. What are the three messages that form this handshake sequence? Why is this important for establishing the connection? Use your textbook and Internet research to compose your answer. The messages that are used to form the handshake are SYN, SYN-ACK, and ACK. They are important because it allows for both ends to initiate and communicate using different TCP sockets at once. 10.1.2 By establishing a TCP connection, you allow one host to verify expected communication to and from the connected host. This provides two important features: windowing/sequencing and error checking/recovery. Windowing and sequencing are used to determine whether messages have been seen and are delivered in the correct order to the recipient. Error checking makes sure that all the packets are delivered as expected, providing reliability. Why are reliability and sequencing important in message delivery? Give an example of when each would be necessary. Its important because it allows for the organization of multiple messages so that the right message is sent in its proper order. Sequencing is the other important part because it makes sure things are in order and also that they are received in the right time frame......

Words: 530 - Pages: 3

Free Essay

Pt1420 Unit 6 Assignment 1

...Week 06 Assignments Textbook Reading * Chapter 4 * Chapter 5 sections 5.1, 5.2, and 5.3 (pages 196-201) Week 06 Homework From the Gaddis textbook: * Programming Exercises 2, 6 and 9, on pages 160-161 For the Programming Exercises, design a program means write the pseudocode for the program. Except for Programming Exercise 2, your design should include multiple modules, not just main(). Upload a Microsoft Word document with the pseudocode to your shared PT1420 community website or submit a paper copy to your instructor by the beginning of the Week 7 class. Programing Exercises pg. 160-161 2. Areas of rectangles Module Main() Declare width1 integer = 0 Declare length1 integer = 0 Declare width2 integer = 0 Declare length2 integer = 0 Declare area1 integer = 0 Declare area2 integer = 0 Call rectangle1 (width1, length1, area1) Call rectangle2 (width2, length2, area2) Call comparison (rectangle1, rectangle2) Display “press enter to continue” End module Module rectangle1 (value width1 as integer, value length1 as integer, value area1 as integer) Display "Enter the width of rectangle 1” Input width1 Display "Enter the length of rectangle 1" Input length1 area1 = width1 * length1 End module Module rectangle2 (value width2 as integer, value length2 as integer, value area2 as integer) Display "Enter the width of rectangle 2” Input width2 Display "Enter the length of rectangle 2" Input length2 area2 = width2 * length2 End......

Words: 764 - Pages: 4

Premium Essay

Unit 6

...Unit 6 Personal Professional Development P2 Assess own knowledge, skills, practice, values, beliefs and career aspirations at the start of the year Year 1 Career Aspirations When I finish my extended diploma in health and social care level 3, I am thinking of moving on to study at a university near home to learn how to become a nurse. I am focusing on hull or York University. I am hoping to study adult nursing. The reason why I want to go onto further study as an adult nurse is because it is a very rewarding and challenging career which will give me the opportunity to change people’s lives throughout my career learning I will learn lots of different practical skills that will benefit the individuals I will be caring for. I want to study adult nursing because I think that I have the required ability that is needed for adult nursing, this includes presence of mind and flexibility to judge the needs of people at the same time. Communication skills are fundamental to being a successful nurse and I must have good personal skills to set people at east in pressure and sometimes in difficult circumstances. I think that I am a caring person who is compassionate, and feel that I can be in different situations and handle them well. I feel that I will get tremendous satisfaction of knowing I’m contributing which will really count in helping and supporting the people I will be supporting. To become a nurse I need to hold a degree in adult nursing. After I have completed......

Words: 634 - Pages: 3

Premium Essay

Unit 6

...CERTIFICATE/DIPLOMA IN BUSINESS BUSINESS COMMUNICATION H/502/5413 LEVEL 3 UNIT 6 GUIDED LEARNING HOURS: 60 UNIT CREDIT VALUE: 10 BUSINESS COMMUNICATION H/502/5413 LEVEL 3 UNIT 6 AIM OF THE UNIT Effective communication is a key area in terms of its contribution to business success. When studying this unit learners will gain a thorough understanding of the types of business information used both internally and externally by organisations and the methods used to communicate information to different audiences. In this unit, learners will have the opportunity to develop, analyse and evaluate a range of methods used to communicate different types of business information and will understand the purpose of such communication. They will also produce and evaluate different types of business communication of their own. www.ocr.org.uk 2 Business Communication Level 3 Unit 6 ASSESSMENT AND GRADING CRITERIA Learning Outcome (LO) Pass Merit 1 Understand different types of business information P1 explain different types of business information, their sources and purposes 2 Be able to present business information effectively P2 present complex internal business information using three different methods appropriate to the user’s needs The assessment criteria are To achieve a merit the the pass requirements for evidence must show that, this unit. in addition to the pass criteria, the......

Words: 1948 - Pages: 8

Free Essay

Itt Technical Institute Pt1420 Unit 2

...David Camacho PT1420 Programming Lab 2.1 Display Welcome to the Fiber Optic Calculator Program. Enter company name. Enter the number of fiber optic cable needed. Multiply .87 times the feet needed for the total cost. Display the total cost of the fiber optic cable and the company name. Purpose of Variable | Variable Name | Stores cost of fiber | fiberCost | Stores the company name | firstChoice | Stores the number of feet to be installed | 50 | Stores the calculated cost of installed fiber | .87 | Display “Welcome to the Fiber Optic Calculator Program” Set fiberCost = .87 Display “What is the company name?” Input companyName Display “How many feet of fiber will be installed” Input feetInstalled Set totalCost = fiberCost * feetInstalled Display “For the company” , companyName, “the total cost will be $” , totalCost David Camacho PT1420 Lab 2.2 Flowchart David Camacho PT1420 Programming Lab 2.3 Visual Studios Program David Camacho Unit 2 HW Assignment 1 Short Answer 1.What does a professional programmer usually do first to gain an understanding of a problem? The programmer creates a design for the program, which starts by asking the customer what they need the program to accomplish. 2.What is pseudocode? Pseudocode is an informal language that has no syntax rules, and is not meant to be compiled or executed. 3.Computer programs typically perform what three steps? Step 1: Input is received. Step 2:......

Words: 718 - Pages: 3

Free Essay

Unit 6

...UNIT 6 PERSONAL AND PROFESSIONAL DEVELOPMENT IN HEALTH AND SOCIAL CARE Unit abstract The aim of this unit is to act as a focal point for all other units in the programme and embed the vocational nature of the qualification. In addition to the requirement for work experience and the opportunity to relate theory to practice, the unit will enable you to bring together your learning from other units. You will initially explore factors that affect learning, then plan and monitor your own personal and professional development and reflect on it. You will also gain key understanding of the health and social care sectors, including aspects of service delivery, and the fundamentals of research methodology. This unit explores the different ways in which learning can take place and how learning from individual experience can be used to enhance the quality of knowledge, skills and practice. You will initially explore your own knowledge, skills, practice, values and beliefs in relation to working in health and social care. You will then draw up a personal plan for self-development over the duration of the programme. The unit also introduces you to health and social care service provision. A minimum of 100 hours work experience is required for successful completion of this unit. Learning Outcomes On completion of this unit you should: 1. Understand the learning process 2. Be able to plan for, monitor and reflect on own development 3. Understand......

Words: 1925 - Pages: 8

Premium Essay

Unit 6

...six Unit Written Assignment Erica R Watson MT435 Operations Management Kaplan University June 28, 2011 Introduction Albatross Anchors manufactures two different types of anchors to satisfy their wholesale customers. The company once only manufactured the mushroom or bell anchor but when the competition heated up they began producing the snag hook anchor as well, this occurred in 1989. (Case Study) Being that Albatross Anchors is a major manufacturer and that they are continuing to grow it seems as though a bigger more organized workspace is needed to speed up both production and shipment of each anchor order. Question One Carefully review the assignment scenario/case study. From the limited information in the scenario/case study, along with your answers to the unit three written assignment, identify at least three direct and specific long-term and three direct and specific short term operations changes that Albatross Anchor must make to gain a clear and sustainable competitive advantage (provide detailed information to validate and support each recommended change) Long-Term Operational Changes (01) A long term operation change that Albatross Anchor needs to make is building another Administrative office that is detached from the warehouse in order to make it both safe and more efficient for all employees. (02)Installing up to date technology into the warehouse and administrative offices will help to gain business and give the company a more smooth transition when taking......

Words: 685 - Pages: 3