Concept explainers
Procedural
- Procedural programming language relies on creating functions or procedures.
- It is derived from structural programming which is also known as imperative programming.
Hence, the correct answer is option “B”.
Explanation of Solution
Procedural Programming:
- The procedural programming usually depends upon procedures or routines or subroutines.
- This programming is centered on procedures or the actions that takes place in the program.
- Procedures separate from data while operating on data items which leads to trouble and the code becomes more complex.
Example:
Examples for procedural language are as follows:
- C
- Pascal
- FORTRAN
- BASIC
Explanation for incorrect options:
Modular:
Modular programming is a designing of software that decomposes an entire program into separate sub programs.
Hence, option “A” is wrong.
Functional:
Functional programming is designed to evaluate mathematical function which uses expressions instead of statements.
Hence, option “C” is wrong.
Object-Oriented:
Object oriented programming relies on creating objects which contains data attributes and methods. It combines the data and program into a single object.
Hence, option “D” is wrong.
Want to see more full solutions like this?
Chapter 14 Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
- Computer Science Please provide UML diagram and Java code Directions This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments in your pseudo-code and Java program as necessary. Your solution must include these components: UML Class diagram Flowchart (Optional) Pseudo-code (Optional) Program Coded Program Output Problem Statement Design a class named Car that has the following fields: year: The year field is an integer that holds the car’s year. make: the make field is a String that holds the make of the car. speed: the speed field is an integer that holds the car’s current speed. In addition, the class should have the following constructor and other methods: Constructor: The constructor should accept the car’s year >model and make as parameters. These values should be assigned to the object’s yearand make fields. The constructor should also assign 0 to the speed field. Accessors: design…arrow_forwardConvert to C# Language def Deposit(balance, pin): # Deposit function p = int(input("Enter the PIN: ")) # taking PIN from user if p == pin: # if PIN matches with actual PIN amount = float(input("Enter deposit amount: ")) # taking deposit amount from user balance += amount # adding deposit amount to balance else: # else (if PIN not matches) print("Incorrect PIN!!") # display message return balance # return balance def Withdraw(balance, pin): # Withdraw function p = int(input("Enter the PIN: ")) # taking PIN from user if p == pin: # if PIN matches with actual PIN amount = float(input("Enter withdraw amount: ")) # taking withdrawal amount from user if amount > balance:…arrow_forwardProgramming - C Language Find the code of the following: 1. FORGIVEN!! Yeeey!! Thanks to your help, my friend Lionel Richie forgave me! In return to his kindness and compassion, I want to give him a gift. I'm thinking of giving him straight up cash! I've already prepared something in advance, I just need your help to complete it. Instructions: In the code editor, you are provided with a main() function that asks for an integer input from the user which represents the cash to be given to Lionel and passes it to the getGift() function call. The getGift() function is already declared and partially defined. Your task is to complete the function definition. The getGift() function multiplies the passed integer value by 3 and then checks if the result is even. If it is, the getGift() function adds 100 to the result. Otherwise, it adds 200 to the result. The getGift() function would then return the result as the return type of this function is int. Input 1. Cash amount…arrow_forward
- Functions are very important in computer programming since they are the building blocks of the code.arrow_forwardThis is an object oriented programming question. The code should be in C++ language Create a class named Person, which contains Two data fields i.e. personName and age A pure virtual function named print() A class named Patient inherits Person class, which contains Two data fields i.e. diseaseType and recommendedMedicine A parameterized constructor to initialize its own data members as well as the inherited data members Overridden function print() to display all details relevant to a patient A class named MedicarePatient inherited from class Patient, which holds A data field representing the name of the hospital A data filed representing the name of the ward A data field representing room number A parameterized constructor to initialize its own data members as well as the inherited data members Overridden function print() to display all details relevant to a patient In the main() function, create instances of derived classes to call respective print() function using dynamic…arrow_forwardOptimization is the fifth stage of the compiler that enhances the performance of code by increasing its speed and reducing the usage of resources.1) Select a portion of code written in a programming language of java choice and apply four types of optimization techniques on it. 2) Explain the applied techniques and their impact on the performance. Note: The word limit is 250-300 words (without considering the example of code)arrow_forward
- c# language Create a console program that will perform the following:• Ask the user to enter five (5) grades• Compute the average of the grades• Round of the average using method of Math class. Name the project as ComputeAverageApp and the class as ComputeAverageProgram.arrow_forwardA(n) ________ tells the compiler that a specific class will be declared later in the program.arrow_forwardThus is an object oriented programming question. The code should be in C++ language Create a class named Shape that includes Two data member named width and height A virtual function named compute_area() to calculate and display the area Derive a class named Triangle inherited from Shape class that contains A parameterized constructor to initialize the inherited data members Overridden function compute_area() to compute and display the area of a triangle (0.5*width*height) Derive a class named Rectangle inherited from Shape class that contains A parameterized constructor to initialize the inherited data members Overridden function compute_area() to compute and display the area of a rectangle (width*height)arrow_forward
- It's important to hide the implementation's complexity____________a) Make the programming easyb) Make the programming complexc) Provide more number of featuresd) Provide better featuresarrow_forwardA _____ specifies the identifier, type, and other aspects of language elements such as variables and functions.arrow_forwardJava programming Project 1 had all the calculations occurring in the main program. For this project, you are to modularize your program. Use functions as much as you can and use Arrays for your menu. be sure that the names you come up with for your modules are verbs and follow case conventions. Please do not create a function for every single input or calculation! Programmers group statements together that accomplish one task, such as getting input from the user and name them appropriately, such as getInput. Make sure every input display cost or money owed. The results of running your program should be identical to the results you obtained in Project 1 (either your original version or a corrected version if there were errors). If the money given is not enough, make sure you loop back or with decision structure to ask for more money. This is project 1: // Project 1 //// This program is designed to take a customers food order and generate a recipt displaying their purchase, the…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr