IN501_Unit2_EricaRLuberisse

docx

School

Wilmington University *

*We aren’t endorsed by this school

Course

IN501

Subject

Industrial Engineering

Date

Dec 6, 2023

Type

docx

Pages

10

Uploaded by CommodoreNeutron12017

Report
Unit 2 Assignment Erica Luberisse IN501 - Fundamentals of Computer Programming Dr. Yamiah Torrence Purdue Global University October 3, 2023
1. Answer the following questions. 1. Why are requirements important when creating computer programs? Defining the expected behavior of any system you are making the program for is essential when creating programs. Without being clear and specific about what is needed from the program, the proper output will not match what is being asked of the program. For this reason, it is essential to ensure that requirements are met and followed when creating a computer program. 2. Can software be created without requirements? Why or why not? Whether or not software can be created without requirements, the answer to this question is no. Requirements are needed for the software to function correctly and complete the tasks asked of the software. Another reason requirements are essential for software is that depending on the type of system the software is working on, the requirements for that system may differ from unit to unit. 3. Define the software development life cycle and explain why each step within the cycle is important. According to Coursera’s article on Software Development Life Cycle, The following is a breakdown of the stages of how the cycle works [ CITATION Cou23 \l 1033 ]:
Stage 1: Plan and brainstorm - This stage is crucial because it is not only the first stage but also the stage where you set the groundwork for the software. This stage is where the requirements for the software are thought of and created based on the ideas of what the software will do. Planning this out to ensure everything following this stage will be correct and make the software functional. Stage 2: Analyze requirements - In this stage, the requirements and designs of the software are researched and planned out precisely. The plan document and structure breakdown are together in this stage to move the process. Stage 3: Develop the mockups - In this stage, you would design the framework and mockup of the software to get it ready to be tested. In this stage, the plans are implemented to assemble the software. Depending on the tools selected, this stage can go very smoothly. Stage 4: Develop the code - This stage is where the coding begins for the program. This stage is where the most time is spent in the life cycle. With it being so time-consuming, there is required to be a vast knowledge of programming and the database used to create this program. Stage 5: Test the product - We are finally at the stage where the program is tested to find errors or problems that do not work the way the program needs to. This stage is also where the program will be tested to integrate into existing systems, other software, and processes.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Stage 6: implement and launch the product - The program will be implemented after all testing is completed, and the final product will be launched for customer use. If it were a program that would be used for in-house use, then training for the new program would begin, and acceptance of the new program would occur. Then, the program would be launched for everyone in-house to use. Stage 7: Set up maintenance and operations - The final stage would be to set up the maintenance for the program and view any bugs that may need to be fixed once it is in full use to ensure the reliability of the new software. 2. Create the functional requirements (how the application should function) for a non- scientific software calculator. These functional requirements outline how the non-scientific software calculator should function, ensuring it meets user needs while maintaining usability and reliability. The applicable requirements for a non-scientific software calculator are: 1. Basic Arithmetic Operations: The calculator should support standard arithmetic operations, including addition, subtraction, multiplication, and division. 2. User-Friendly Interface: The user interface should be intuitive and easy to use, with a clear and organized layout. Buttons for each digit (0-9) should be readily accessible. Operation buttons (+, -, *, /) should be clearly labeled.
3. Input Handling: The calculator should allow users to input numbers and perform calculations using the keyboard and mouse. It should support both numeric keypad and on-screen input. 4. Order of Operations: The calculator should follow the standard order of operations (PEMDAS/BODMAS), ensuring accurate calculations. 5. Memory Functions: The calculator should provide memory functions, including Memory Store (MS), Memory Recall (MR), Memory Clear (MC), and Memory Add (M+). 6. Decimal and Fractional Numbers: The calculator should support decimal numbers and fractions. Users should be able to switch between decimal and fractional representations. 7. Clear and Delete Functions: A “Clear” button should clear the current input. A “Delete” button should allow users to remove the last entered digit or operation. 8. Result Display: The calculator should display the current input and result. The result should update dynamically as the user enters information. 9. Error Handling: The calculator should handle common errors gracefully, such as division by zero or invalid input. Error messages should be clear, informative, and displayed to the user. 10. Keyboard Shortcuts: Keyboard shortcuts (e.g., Enter for equals, Esc for clear) should be supported for efficiency.
11. Auto-Clear Function: The calculator may include an auto-clear feature, which automatically clears the input after a specific time of inactivity. 12. History and Recall: Users should be able to view a history of their calculations and recall previous results for reference. 13. Accessibility: The calculator should be designed to be accessible to users with disabilities, including keyboard navigation and screen reader compatibility. 14. Help and Documentation: The application should include built-in help and documentation to assist users in understanding its features and functionality. This process can be achieved with a user manual that can accompany the packaging of the calculator. 15. Updates and Maintenance: The calculator should receive periodic updates and maintenance to fix bugs and improve performance. 3. Design the following programs. For each, one, you must have at least IPO chart and use either flowcharts or pseudocode for the logic of the program. 1. Temperature conversion program 1. Inputs are a temperature value and unit of temperature measurement. For example, the user would enter “60, F” at the command line. 2. The conversion program will convert Fahrenheit to Celsius or Celsius to Fahrenheit. 3. The result will be written to the command line. IPO Chart
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Pseudocode: 1. Start the program 2. Input temperature as a numeric value 3. Input unit of temperature measurement (Fahrenheit or Celsius) as a string 4. If unit is “F”: a. Convert temperature to Celsius using the formula: celsius = (temperature - 32) * 5/9 Else if unit is “C”: a. Convert temperature to Fahrenheit using the formula: fahrenheit = (temperature * 9/5) + 32 Else: a. Display an error message and terminate the program 5. Display the converted temperature 6. End the program Input Temperature value (numeric) and unit of temperature measurement (Fahrenheit or Celsius). Process Convert temperature from Fahrenheit to Celsius or Celsius to Fahrenheit based on user input. Output Display the converted temperature.
2. Simple salary calculator 1. 25 employees 2. Name, hourly rates, and hours worked are in a flat file in this format: Last name, first name, hourly rate, hours worked, supervisor email account 1. For example, a record would look like: 1. “Smith, Joe, 15, 40, lucy_ball@company.com” 2. Full-time is 40 hours per week. 3. For anything over 40 hours, the employee makes 1.5 times their hourly rate. 4. Overtime should not exceed 50 hours. 5. If the employee worked over 50 hours, an email message must go to the employee’s supervisor. 6. Write the results to another file in the following format: Last name, first name, weekly salary, and add a Y or N to the file if the supervisor was sent an email. 1. For example, the output record would look like: 1. “Smith, Joe, 600, N” IPO Chart: Pseudocode: 1. Start the program Input Employee data (name, hourly rate, hours worked, supervisor email) for 25 employees from a flat file. Process Calculate the weekly salary, check for overtime, send an email to the supervisor if necessary, and format the output. Output Write the results (last name, first name, weekly salary, email sent Y/N) to another file.
2. Read employee data from a flat file (e.g., CSV format) containing 25 records: - Last name - First name - Hourly rate - Hours worked - Supervisor email 3. For each employee record: a. Calculate the weekly salary: - If hours worked <= 40: weekly_salary = hourly_rate * hours_worked - Else: weekly_salary = (hourly_rate * 40) + (hourly_rate * 1.5 * (hours_worked - 40)) b. Check if hours worked > 50: - If yes, send an email to the supervisor and set email_sent = “Y” - If no, set email_sent = “N” c. Format the output as: Last name, first name, weekly_salary, email_sent d. Write the formatted output to another file. 4. End the program
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
References Coursera. (2023, June 16). What Is the Software Development Life Cycle? SDLC Explained . Retrieved October 2, 2023, from Coursera: https://www.coursera.org/articles/software- development-life-cycle