N-SIDED REGULAR POLYGON) In an n-sided regular polygon, all sides have the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named Regular Polygon that contains: ▪ A private int data field named n that defines the number of sides in the polygon with default value 3. ▪ A private double data field named side that stores the length of the side with default value 1. ▪ A private double data field named x that defines the x-coordinate of the polygon's center with default value 0. ▪ A private double data field named y that defines the y-coordinate of the
Q: Conditional Logic Which of the following Excel functions can replace nested IF() statements? (Select…
A: The objective of the question is to identify the Excel functions that can be used as alternatives to…
Q: To indicate a single line comment in Java, we start the line with ___. #…
A: The question is asking about the syntax for single line comments in Java.
Q: Redraw the following ERM diagram using the (min, max) notation. N Code BANK Name Addr Phone AcctNo…
A: Min,Max notations are the structural representation of ER diagram. It is represented as a pair of…
Q: Recall that a phone lattice is a type of state diagram, i.e. a directed graph where each node…
A: Edges (not states) should have letters. Each edge should contain one letter, not two or three. Avoid…
Q: Instructions The files provided in the code editor to the right contain syntax and/or logic errors.…
A: Algorithm:Create a class DebugCircle to represent a circle with methods to calculate its radius,…
Q: Date Functions Which of the following statements about Date Serial numbers in Excel are TRUE?…
A: The objective of the question is to identify the correct statements about Date Serial numbers in…
Q: Which of the following statements is false? You can specify the default amount of space between a…
A: GUI developers must understand user interaction to create intuitive and functional apps. Various…
Q: Excel Tables - Structured Reference What does the "@" symbol represent in a Structured Reference to…
A: The '@' symbol in a structured reference to an Excel table has a specific meaning. It is not a…
Q: a. What is the value of 8*(q0, ab)? b. What is the value of 8*(q0, aba)? c. Use a configuration…
A: Imagine a gadget that navigates a maze, unsure of the proper direction at times, but reaching the…
Q: Describe in detail how you can enhance a simple capability mechanism to help you enforce a security…
A: In addressing the challenge of enforcing a security policy that mandates a specific sequence of…
Q: Design a class named Location for locating a maximal value and its location in a two-dimensional…
A: The Location class is defined with three public fields: row, column, and maxValue. These fields…
Q: What are the connections between the following concepts: letter frequency , avalanche effect,…
A: The concepts of letter frequency, avalanche effect, correlation between plaintext and ciphertext,…
Q: xplain how task allocation helps in balancing workloads among team members.
A: Task allocation in team settings is a strategic approach to dividing work among members to optimize…
Q: The Java basic data types that can hold whole numbers (integers and their negatives) are: int,…
A: The core building blocks of Java applications are the basic data types, which are used to represent…
Q: Write a pseudocode and create a flowchart for this question; The colors red, blue, and yellow…
A: The main colors—red, blue, and yellow—rule the complex universe of hues. Because they cannot be…
Q: CHALLENGE ACTIVITY 2.11.1: Enter the output of the integer expressions. 547700.3242818.qx3zqy7 Jump…
A: Step-1: StartStep-2: Declare variable x and y Step-3: In x assign 1Step-4: In y assign 2 *…
Q: onvert the given CFG to GNF, where S -> ABA A -> aA | ε B -> bB | E
A: Context-free languages are described by context-free grammars (CFGs). A collection of recursive…
Q: 6.11 (FINANCIAL APPLICATION: COMPUTE COMMISSIONS) Write a method that computes the commission, using…
A: Step-1: StartStep-2: Start a loop from i=10000 to 100000 with increment of 5000 Step-2.1: Print i…
Q: How will you troubleshoot a performance issue if the information available in Task Manager is not…
A: Any fault or decline in a system, application, or process's speed, responsiveness, or efficiency is…
Q: KPIs should be regularly reviewed and updated True False
A: Key Performance Indicators (KPIs) are vital tools used by organizations to measure progress towards…
Q: What is the decimal representation of each of the following unsigned binary integers? 00110101…
A: 1) Binary is a base-2 numeral system. It uses only two digits, typically 0 and 1, to represent…
Q: What is the difference between nonvolatile and volatile memory
A: Computer memory is a crucial component of computing systems, responsible for storing and retrieving…
Q: Select all the strings that are elements of the following set: {a,b}² µ{a,b}³ µ{a,b}ª (b) (ba)…
A: The set in question is a combination of three sets: {a,b}², {a,b}3 , and {a,b}4 . To understand…
Q: I need help with this in html, please try to make it like the pictures and show codei need…
A: To recreate the home page as seen in the provided screenshots using Bootstrap, follow these…
Q: Each group represents one OOP principle.Create a new thread and for each grouping, identify the OOP…
A: Object-Oriented Programming (OOP) is a fundamental paradigm in computer science that enables the…
Q: I need help with my MATLAB code. I having problems with the double values of trig. For the following…
A: MathWorks created MATLAB, a high-level programming language and interactive environment. It is…
Q: Alert dont submit AI generated answer.
A: In this questrion we have to deisgn Turing Machine for the given languages:a) {w | w contains an…
Q: PYTHON/JUPYTER NOTEBOOKS Program a forward solver (i.e. write your code) for lower triangular…
A: In this question we have to been provided with the mathematical formula for a forward substitution…
Q: Suppose Kansas Uni has deployed a web cache which has an average cache hit rate of 0.8, meaning 80%…
A: 1) A web cache is a mechanism used to store copies of web documents, such as HTML pages, images, and…
Q: Program (in a Python function) a LU factorization algorithm (without using (mxm) pivoting) for a…
A: LU factorization is a matrix decomposition technique that factors a matrix A into a lower triangular…
Q: How is artificial intelligence (AI) tested in chess?
A: The objective of the question is to understand the process of testing artificial intelligence (AI)…
Q: You will need to use word processing program such as Word to design a flowchart that performs the…
A: Flowchart : A flowchart is a graphical representation of a process or an algorithm, using various…
Q: Execute a SQL statement to add a check constraint to the field mode_of_payment with values ('D', 'R'…
A: To save accurate and dependable data in the order_db database, data integrity is essential. A check…
Q: Insert the following n objects, in the order given, into a binary min-heap and place your answer…
A: A tree is a hierarchical data structure used in computer science that is made up of nodes connected…
Q: In the magical realm of Celestia, the Gates of Harmony stand as the guardians of cosmic balance. To…
A: Define a function is_prime(n) that checks if a number is prime.Define a function validate_code(code)…
Q: 3. Let - (10-¹6 1) A = b-(3) and b = Here we will see the effect of using a tiny element as a pivot.…
A: The system to be solved is:A⋅x=bwhere matrix A and vector b are given by:Solving the linear system…
Q: software specification
A: The objective of the first part of the question is to convert a given regular expression into a…
Q: Array: dq 39, 15, 23, 81, 45, 24, 64, 93, 64, 21, 19, -7, 93, 48, 123, 44 Using the array "Array"…
A: In computer science and programming, arrays are fundamental data structures used to store…
Q: For each of the following recurrences, verify the answer you get by applying the master method, by…
A: A recurrence relation characterizes a function in terms of its value at smaller inputs in…
Q: How many total bits are required for a direct-mapped cache with 2^12 blocks (12-bit index), two-word…
A: Cache memory is a crucial component in computer architecture, serving as a high-speed intermediate…
Q: What is the purpose of the instruction pointer register?
A: The instruction pointer register, also known as the program counter (PC) in some architectures,…
Q: Give a context-free grammar that generates the language: A= (a blck | i jor j = k where i, j, k >=…
A: Here's a context-free grammar (CFG) that generates the language A={aibjck∣i=j or j=k, where…
Q: Show how each of the following floating point values would be stored using IEEE-754 double precision…
A: When we talk about double precision numbers, we're talking about a floating-point format that can…
Q: Program the Turing Machine simulator to recognize the language F of Fibonacci numbers. That is, if…
A: Turing Machine Code (TMC) that recognizes the language of Fibonacci numbers:
Q: Define these functions in SML Language with using the standard functions abs and length, and the…
A: In this question we have to write a SML functions for the function description provided, as per the…
Q: 2) Consider the following NFA transitions with states p,q,r,s (p is the initial state and s is the…
A: δ(p, 0) = {p, q} δ(p, 1) = {p} δ(q, 0) = rδ(q, 1) = rδ(r, 0) = sδ(r, 1) = Øδ(s, 0) = sδ(s, 1) =…
Q: Using three propositions for each example expressed with words and logic: Create two truth table…
A: The objective of the question is to create two truth tables using three propositions for each…
Q: write a snippet of java code that contains a for loop to compute 1 + 9 + 25 +...+81, i.e. the for…
A: The objective of the question is to write a Java code snippet that calculates the sum of the squares…
Q: can you do this Adder part please? Thank you
A: The objective of the question is to understand the binary representation of numbers, perform binary…
Q: 25. Given two ordered arrays {a₁, a2, a3} and {b₁,b2, b3} with a₁ < a2 < a3 and b₁ < b₂ < b3, we…
A: An array is a type of data structure used in computer science that holds a group of elements in…
Step by step
Solved in 3 steps with 2 images
- Book Donation App Create a book-app directory. The app can be used to manage book donations and track donors and books. The catalog is implemented using the following classes: 1. The app should have donors-repo.js to maintain the list of donors and allow adding, updating, and deleting donors. The donor object has donorID, firstName, lastName, and email properties. This module should implement the following functions: • getDonor(donorId): returns a donor by id. • addDonor(donor): adds a donor to the list of donors; donorID should be autoassigned a random number. • updateDonor(donor): updates the donor having the matching donorID. • deleteDonor(donorID): delete the donor with donorID from the list of donors, only if they are not associated with any books. 2. The app should have books-repo.js to maintain the list of donated books and allow adding, updating, and deleting books. The book object has bookID, title, authors, and donorID properties. • donorID references the book’s donor. This…In an n-sided regular polygon, all sides have the same length and all angles have the same degree (i.e., the polygon is both equi-lateral and equiangular). Design a class named RegularPolygon that contains:■ ■ A private int data field named n that defines the number of sides in the polygon with default value 3. A private double data field named side that stores the length of the side with default value 1.■ ■ A private double data field named x that defines the x-coordinate of the poly-gon’s center with default value 0.■ ■ A private double data field named y that defines the y-coordinate of the poly-gon’s center with default value 0.■ ■ A no-arg constructor that creates a regular polygon with default values.■ ■ A constructor that creates a regular polygon with the specified number of sides and length of side, centered at (0, 0).■ ■ A constructor that creates a regular polygon with the specified number of sides, length of side, and x- and y-coordinates.■ ■ The accessor and mutator…StockList Class • This class will contain the methods necessary to display various information about the stock data. • This class shall be a subclass of ArrayList. • This class shall not contain any data fields. (You don't need them for this class if done correctly). • This class shall have a default constructor with no parameters. o No other constructors are allowed. • This class shall have the following public, non-static, methods: • printAllStocks: This method shall take no parameters and return nothing. ▪ This method should print each stock in the StockList to an output file. ▪ NOTE: This method shall NOT print the data to the console. The output file shall be called all_stock_data.txt. The data should be printed in a nice and easy to read format. o displayFirstTenStocks: This method shall take no parameters and return nothing. ▪ This method should display only the first 10 stocks in the StockList in a nice and easy to read format. ▪ This method should display the data in the…
- In an n-sided regular polygon, all sides havethe same length and all angles have the same degree (i.e., the polygon is both equilateraland equiangular). Design a class named RegularPolygon that contains:■■ A private int data field named n that defines the number of sides in the polygon with default value 3. ■■ A private double data field named side that stores the length of the side withdefault value 1.■■ A private double data field named x that defines the x-coordinate of the polygon’scenter with default value 0.■■ A private double data field named y that defines the y-coordinate of the polygon’scenter with default value 0.■■ A no-arg constructor that creates a regular polygon with default values.■■ A constructor that creates a regular polygon with the specified number of sidesand length of side, centered at (0, 0).■■ A constructor that creates a regular polygon with the specified number of sides,length of side, and x- and y-coordinates.■■ The accessor and mutator methods for all data…An n-sided regular polygon’s sides all have the same length and all of its angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon thatcontains:■ A private int data field named n that defines the number of sides in the polygon.■ A private float data field named side that stores the length of the side.■ A private float data field named x that defines the x-coordinate of the center of the polygon with default value 0. ■ A private float data field named y that defines the y-coordinate of the center of the polygon with default value 0.■ A constructor that creates a regular polygon with the specified n (default 3),side (default 1), x (default 0), and y (default 0).■ The accessor and mutator methods for all data fields.■ The method getPerimeter() that returns the perimeter of the polygon.■ The method getArea() that returns the area of the polygon. The formula for computing the area of a regular polygon is Area = (n * s2) / (4 *…Create a class Distance with feet and inches as a private dada members. Feet has int type and inches has float type. Create getdist & showdist functions which take values from user and then display these values respectively. Create another class Sign with sign as a private data member. Sign has a char data type. Class sign is inherited with distance class. Create getdist and showdist function to get values from user and then display all values. Create default & arrguments constructor also. Add a static data member named objCount, initialize it to 0 using scope resolution operator outside the class, add a function in the class to print the value of objCount.
- // Declare data fields: a String named customerName, // an int named numItems, and // a double named totalCost.// Your code here... // Implement the default contructor.// Set the value of customerName to "no name"// and use zero for the other data fields.// Your code here... // Implement the overloaded constructor that// passes new values to all data fields.// Your code here... // Implement method getTotalCost to return the totalCost.// Your code here... // Implement method buyItem.//// Adds itemCost to the total cost and increments// (adds 1 to) the number of items in the cart.//// Parameter: a double itemCost indicating the cost of the item.public void buyItem(double itemCost){// Your code here... }// Implement method applyCoupon.//// Apply a coupon to the total cost of the cart.// - Normal coupon: the unit discount is subtracted ONCE// from the total cost.// - Bonus coupon: the unit discount is subtracted TWICE// from the total cost.// - HOWEVER, a bonus coupon only applies if the…True/ False 1- Class objects can be defined prior to the class declaration. 2- You must use the private access specification for all data members of a class. 3- If an array is partially initialized, the uninitialized elements will be set to zero. 4- A vector object automatically expands in size to accommodate the items stored in it. 5- With pointer variables, you can access but not modify data in other variables. 6- Assuming myValues is an array of int values and index is an int variable, both of the following statements do the same thing. 1. cout header file. 15- To solve a problem recursively, you must identify at least one case in which the problem can be solved without recursion.In java programming language Design a class named Account that contains:• A private double data field named annualInterestRate that stores the current interest rate.Assume all accounts have the same interest rate (i.e. static member data).• A private int data field named nextAccountNb that stores the next account number to beassigned (default 300). Assume all accounts use this data member to assign the account number while creating an account (i.e. static member data).• A private int data field named accounNb for the account.• A private String data field named f_name for first name.• A private String data field named l_name for last name.• A private double data field named balance for the account.• A private Date data field named dateCreated that stores the date when the account wascreated. (usejava.util.Dateclass)• A constructor that creates an account for a given first name, last name, and initial balance. It sets up a new account number, first name, last name, balance, date of…
- 2. The MyInteger Class Problem Description: Design a class named MyInteger. The class contains: n [] [] A private int data field named value that stores the int value represented by this object. A constructor that creates a MyInteger object for the specified int value. A get method that returns the int value. Methods isEven () and isOdd () that return true if the value is even or odd respectively. Static methods isEven (int) and isOdd (int) that return true if the specified value is even or odd respectively. Static methods isEven (MyInteger) and isOdd (MyInteger) that return true if the specified value is even or odd respectively. Methods equals (int) and equals (MyInteger) that return true if the value in the object is equal to the specified value. Implement the class. Write a client program that tests all methods in the class.Computer Science Write the code to define a class called student. The student class should contain a data attribute called name and another attribute called gpa. Write the Student class to include an initializer method __init__ and a __str__ method. Create two different objects of the student class and call print on each object to display the output in the __str__method.Create a BowlingTeam class The class has 2 fields: a field for the team name and an array that holds the team members’ names. Create get and set methods for the teamName field. Add a setMember method that sets a team member’s name. The method requires a position and a name, and it uses the position as a subscript to the members array. Add a getMember method that returns a team member’s name. The method requires a value used as a subscript that determines which member’s name to return. Create a BowlingTeamDemo class. In the main method include the following: Declare 2 variables: name and a constant NUM_TEAMS that holds 4 Bowling Team objects. Declare and instantiate an array teams of BowlingTeam objects. Using nested for loops, prompt the user to enter the 4 team names and enter the team members’ names. Using another nested for loop, output each team’s name and their team members’. Output should look like: Members of team The Lucky Strikes Carlos Diego Rose Lynn Members of team I…