The _______
a. modular
b. procedural
c. functional
d. object-oriented
Procedural Programming:
- 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 take 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 programming is a designing of software that decomposes an entire program into separate sub-programs.
Hence, option “A” is wrong.
Functional programming is designed to evaluate mathematical function that uses expressions instead of statements.
Hence, option “C” is wrong.
Object-oriented programming relies on creating objects that contain 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 10 Solutions
Starting Out with Python (4th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (6th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Software Engineering (10th Edition)
C How to Program (8th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
- PLEASE CODE IN PYTHON PLEASE USE THE CLASS FUNCTION In python, create a LunchOrder application that prompts the user for the number of hamburgers, salads, french fries, and sodas and then displays the total for the order. The LunchOrder application should includea Food object with a constructor that accepts the price, fat, carbs, and fiber for an item. Food methods should return the price of the item and return the fat, carbohydrates, and fiber. Use the chart below forfood prices and nutrition information:arrow_forwardCreate a library named programmerwhich describes a software programmer using the following properties. -FName: the programmer's first name(a string of 25 characters max) -LName: the programmer's last name (a string of 25 characters max) -Years: the programmer's number of years of experience. -Age: the programmer's age.-Gender: the programmer's gender ('M' or 'F'). Write a header file ‘programmer.h’ whichcontains user defined structure representing a programmer(programmer_t) and functions to accomplish the following tasks: -Read a programmer's properties. -Compare two programmers years of experience. -Print a programmer's properties as follows (example): Name: Joe Smith Age: 45years Gender: M Years of experience: 20 yearsarrow_forwardIn C++ design a class named Triangle that extends GeometricObject. The class contains the following: Three double data fields named side1, side2, and side3 to denote three sides of the triangle. A no-arg constructor that creates a default triangle with each side 1.0. A constructor that creates a rectangle with the specified side1, side2, and side3. The constant accessor functions for all three data fields. A constant function named getArea() that returns the area of this triangle. A constant function named getPerimeter() that returns the perimeter of this triangle. Submit the following: Draw the UML diagram that involves the classes Triangle and GeometricObject. Implement the class. Write a test program that prompts the user to enter three sides of the triangle, enter a color, and enter 1 or 0 to indicate whether the triangle is filled. The program should create a Triangle object with these sides and set the color and filled properties using the input. The program should display the…arrow_forward
- Indicate whether each of the following C# programming language identifiers is legal or illegal. If it is legal, indicate whether it is a conventional identifier for a class. electricBill ElectricBill Electric bill Static void #ssn Ay56we Theater_Tickets 212AreaCode heightInCentimeters Zip23891 Voidarrow_forwardC++ Design a class named Rectangle to represent a rectangle. The class contains: Two double data fields named width and height that specify the width and height of the rectangle. A no-arg constructor that creates a rectangle with width 1 and height 1 . A constructor that creates a rectangle with the specified width and height. The accessor and mutator functions for all the data fields. A function named getArea() that returns the area of this rectangle. A function named getPerimeter() that returns the perimeter. Implement the class. Write a test program that creates two Rectangle objects. Assign width 4 and height 40 to the first object and width 3.5 and height 35.9 to the second. Display the width, height, area, and perimeters of the first object and then the second object.arrow_forwardcan I get help writing this in c++ It is your job to create an object-oriented application that will allow the financial advisor to maintain the portfolios for his/her clients. You will need to create several classes to maintain this information: Security, Stock, Bond, Portfolio, and Date. The characteristics of stocks and bonds in a portfolio are shown below: Stocks: Bonds: Purchase date (Date) Purchase date (Date) Purchase price (double) Purchase price (double) Quantity purchased (int) Quantity purchased (int) Ticker symbol (string) Issuer (string) Par value (int) Face value (int) Stock type (i.e. Common or Preferred) (enum) Stated interest rate…arrow_forward
- This 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_forwardAccess to more information is preferable to less knowledge when it comes to programming; yet, you should not base your decision just on how well something functions.arrow_forwardA point in the x-y plane is represented by its x-coordinate and y-coordinate. Design a class,pointType, that can store and process a point in the x-y plane. You should then perform operations on the point, such as setting the coordinates of the point, printing the coordinates of the point, returning the xcoordinate, and returning the y-coordinate. Also, write a program to test various operations on the point. Note: Write program in c++ language solve as soon as possible use oop conceptsarrow_forward
- In c++ please (The Rectangle class)Design a class named Rectangle to represent a rectangle. The class contains:• Two double data fields named width and height that specify the width and height of the rectangle.• A no-arg constructor that creates a rectangle with width 1 and height 1.• A constructor that creates a rectangle with the specified width and height.• The accessor and mutator functions for all the data fields.• A function named getArea()that returns the area of this rectangle.• A function named getPerimeter() that returns the perimeter.Implement the class. Write a test program that creates two Rectangle objects. Assign width 4 and height 40 to the first object and width 3.5 and height 35.9 to the second. Display the width, height, area, and perimeters of the first object and then the second object.arrow_forwardWhen it comes to computer programming, why is the creation of functions even necessary in the first place?arrow_forwardInstructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and a character value for its gender. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. In the main(), there are two Persons already created: one Male Person and one Female Person. Your task is to first ask the user for the age of the Male Person and the age of the Female Person. Then, define and declare a function called createKidPerson() which has the following definition: Return type - Person Name - createKidPerson Parameters Person father - the father of the kid to be created Person mother - the mother of the kid to be created Description - creates a new Person and returns this. The age of this Person will be set to 1 while its gender will be set based on the rules mentioned above. Finally, create a new Person and call this createKidPerson() in the main and then pass this newly…arrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr