(Algebra: vertex form equations) The equation of a parabola can be expressed in either standard form (y = ax2 + bx + c) or vertex form (y = a(x – h)2 + k). Write a program that prompts the user to enter a, b, and c as integers in standard form and display
Enter a, b, c: 1 3 1 h is –3/2 k is –5/4 |
Enter a, b, c: 2 3 4 h is –3/4 k is 23/8 |
Want to see the full answer?
Check out a sample textbook solutionChapter 13 Solutions
Introduction to Java Programming and Data Structures: Brief Version (11th Global Edition)
Additional Engineering Textbook Solutions
Elementary Surveying: An Introduction To Geomatics (15th Edition)
Management Information Systems: Managing The Digital Firm (16th Edition)
SURVEY OF OPERATING SYSTEMS
Degarmo's Materials And Processes In Manufacturing
Starting Out With Visual Basic (8th Edition)
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
- Analysis: (Describe the problem including input and output in your own words.) Design: (Describe the major steps for solving the problem.) Coding: (Go over your code step by step) Testing: (Describe how you test this program). In other words run your code with sample outputs Analysis of the problem: There is a rectangle with vertices a,b,c,d(let). The position of the vertices are : a=(-5,2.5) b=(-5,-2.5) c=(5,-2.5) d=(5,2.5) The centre of the rectangle is (0,0). Now a point x,y would be given by the user and the program concludes whether the point x,y is within the rectangle or not. The approach of the java code: Take the input of the 2D coordinates from the user. Check whether the horizontal distance is between -5 to 5 and the vertical distance is between -2.5 to 2.5. If the condition is true print the coordinate within the given rectangle. Otherwise print it is not in the rectangle. import java.util.*; class Main{ public static void main(String [] args){ Scanner…arrow_forward(YOU ARE NOT ALLOWED TO USE ARRAYLIST IN THIS PROJECT)Write a Java program to simulate a blackjack game of cards. The computer will play the role of the dealer. The program will randomly generate the cards dealt to the player and dealer during the game. Cards in this game will be represented by numbers 1 to 13 with Ace being represented by a 1. Remember, that face cards (i.e. Jack, Queen, and King) are worth 10 points to a hand while an Ace can be worth 1 or 11 points depending on the user’s choice. The numbered cards are worth their number value to the hand.arrow_forwardIn C Programming Language solve the following programarrow_forward
- Final Expression = x4'x3'x2'x1' + x4x3x2'x1' + x4x3'x2x1' + x4x3'x2'x1 + x4'x3x2x1' + x4'x3x2'x1 + x4'x3'x2x1 + x4x3x2x1 This expression needs simplification with boolean algebraarrow_forwardFjul Basicarrow_forwardCourse:Artificial Intelligence Topic:Sample Neural Network to calculate total error using Forward pass backpropagation. Problem:Implement forward pass backpropagation for 100(for two input 200)random numbers.(Set range for random numbers 0.01-1.00) using C++/Python with short explanation with key points.arrow_forward
- 2, Towers of Hanoi Problem. (10 points) The Towers of Hanoi is a famous problem for studying recursion in computer science and searching in artificial intelligence. We start with N discs of varying sizes on a peg (stacked in order according to size), and two empty pegs. We are allowed to move a disc from one peg to another, but we are never allowed to move a larger disc on top of a smaller disc. The goal is to move all the discs to the rightmost peg (see figure). To solve the problem by using search methods, we need first formulate the problem. Supposing there are K pegs and N disk. Answer the following questions. (1) Determine a state representation for this problem. (4points) (2) What is the size of the state space? (3 points) (3) Supposing K=3, N=4, what is the start state by using your proposed state representation method and what is the goal state? (3 points)arrow_forwardMatlabarrow_forwardComputer sciencearrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education