Homework

Homework Questions? Ask a Tutor for Answers ASAP

Connect one-on-one with {0} who will answer your question

Customer Question

1. Project Specification Design, implement and...

1. Project Specification

Design, implement and test an object-oriented Java program for processing single-variable polynomials represented as lists. Consider polynomials with integer coefficients and positive integer exponents. Implement the operations of addition and subtraction of two polynomials. Read the polynomials from an input file which should be either supplied as command line parameter or the user should be invited to specify it. A polynomial is represented in the input file by its name, the equal sign, and a set of pairs of integers, each pair consisting of the exponent and its corresponding coefficient (see the Examples section below). For example, P1 = 3 5 1 -4 0 8 represents the polynomial 5X^3 -4X + 8. After reading the polynomials, they will be displayed on the screen in human readable form (see the required format in the Examples section below). A polynomial will always be written from the highest exponent to the lowest. A term having coefficient value zero will be omitted. The operations on polynomials will be entered by the user from the console (see the Examples section below). After executing the required operation: (i) the program should store the new generated polynomial (to be further used in other operations in the same execution session), (ii) the result will be shown at the console in human readable form and (iii) the user will be allowed to specify another operation or to exit the program.

2. Examples

Example of input file content:

P1 = 3 5 1 -4 0 8 POL2 = 5 6 2 -2 1 7 0 -4

Beta = 3 -4 2 7 0 -3

Example of the console output in human readable form:

P1 = 5X^3 –4X +8 POL2 = 6X^5 -2X^2 +7X -4

Beta = -4X^3 +7X^2 -3

Example of user specified operation:

Please enter the first polynomial operand: POL2 Please enter the second polynomial operand: P1 Please enter the operation: -

Please enter the name of the new polynomial: P3

Executing the operation ...

P3 = 6X^5 -5X^3 -2X^2 +11X -12

Do you want to continue (Y or N)?

Design, implement and test an object-oriented Java program for processing single-variable polynomials represented as lists. Consider polynomials with integer coefficients and positive integer exponents. Implement the operations of addition and subtraction of two polynomials. Read the polynomials from an input file which should be either supplied as command line parameter or the user should be invited to specify it. A polynomial is represented in the input file by its name, the equal sign, and a set of pairs of integers, each pair consisting of the exponent and its corresponding coefficient (see the Examples section below). For example, P1 = 3 5 1 -4 0 8 represents the polynomial 5X^3 -4X + 8. After reading the polynomials, they will be displayed on the screen in human readable form (see the required format in the Examples section below). A polynomial will always be written from the highest exponent to the lowest. A term having coefficient value zero will be omitted. The operations on polynomials will be entered by the user from the console (see the Examples section below). After executing the required operation: (i) the program should store the new generated polynomial (to be further used in other operations in the same execution session), (ii) the result will be shown at the console in human readable form and (iii) the user will be allowed to specify another operation or to exit the program.

2. Examples

Example of input file content:

P1 = 3 5 1 -4 0 8 POL2 = 5 6 2 -2 1 7 0 -4

Beta = 3 -4 2 7 0 -3

Example of the console output in human readable form:

P1 = 5X^3 –4X +8 POL2 = 6X^5 -2X^2 +7X -4

Beta = -4X^3 +7X^2 -3

Example of user specified operation:

Please enter the first polynomial operand: POL2 Please enter the second polynomial operand: P1 Please enter the operation: -

Please enter the name of the new polynomial: P3

Executing the operation ...

P3 = 6X^5 -5X^3 -2X^2 +11X -12

Do you want to continue (Y or N)?

Show More

Show Less

Was this answer helpful?

Describe your issueThe assistant will guide you

Chat 1:1 with a tutorLicensed Experts are available 24/7

100% satisfaction guaranteeGet all the answers you need

Related Homework Questions

I am having a problem creating the following in java: 1) Ask

I am having a problem creating the following in java:1) Ask the user for three positive integers "base", "exponent", and "modulus". These integers should be represented in Java as "BigInteger" data ty… read more

Add the following instruction to ISA Jumploffset X This

Add the following instruction to MARIE ISA Jumploffset X This instruction will jump to the address calculated by going to address, then adding the value found there to the value in AC Show how this in… read more

Design a class called PolynomialFactor to represent a single

Design a class called PolynomialFactor to represent a single item polynomial factor. A single item polynomial factor has 3 instance properties: o coefficient o baseFactor o exponent - Examples: o 5: I… read more

Can i get the same code? i have the deadline tonight. I need

hello can i get the same code? i have the deadline tonight … read more

I have the exact same lab, can you please help me? I am

hi, I have the exact same lab, can you please help me? … read more

Description: 1. In this project you will develop a Python

Description: 1. In this project you will develop a Python program to manage information about baseball players. The program will maintain the following information for each player in the data set: pla… read more

The first assignment needs to be done Feb. 10. The second

The first assignment needs to be done Feb. 10. The second assignment needs to be done Feb. 18.… read more

Create a class Polynomial that is used to evaluate a

Create a class Polynomial that is used to evaluate a polynomial function of x: P(x) = a0 + a1x + a2x2 + … + an-1xn-1 + anxn The coefficients ai are floating-point numbers, the exponents of x are integ… read more

A small computer has two registers, R1 and R2, and the following

A small computer has two registers, R1 and R2, and the following instructions: LOAD, SUBTRACT, MULTIPLY, BNZ, PRINT and STOP. The format of the instructions is shown in the table below: Operation Code… read more

Write a program to model a simple calculator. Each data line

Write a program to model a simple calculator. Each data line should consist of the next operation to be performed from the list below and the right operand. Assume the left operand is the accumulator … read more

Polynomial Processing using Lists 1. Project Specification Design,

Polynomial Processing using Lists 1. Project Specification Design, implement and test an object-oriented Java program for processing single-variable polynomials represented as lists. Consider polynomi… read more

Q#1 Write a console program to: 1. Read an input file that

Q#1 Write a console program to: 1. Read an input file that contains sets of 3 numbers separated by the delimiter (#) until the end of file. Check that the file was successfully opened. 2. All program … read more

For example, if thenP(x)=x3 +3x2 +1andQ(x)=x2 +5x P(x)+Q(x)

For example, if then P(x)=x3 +3x2 +1andQ(x)=x2 +5x P(x)+Q(x) = x3 +4x2 +5x+1 P(x)×Q(x) = x5 +8x4 +15x3 +x2 +5x. Write a Java class PolynomialX whose instances represent a polynomial of variable x. You… read more

I need a python script that takes coordinates of multiple points

I need a python script that takes coordinates of multiple points from the user and calculates the total Euclidean distance between these points. This is how it works: 1. The user specifies the number … read more

For problems 1-3 you must: Write a Python (.py) program Test,

For problems 1-3 you must: Write a Python (.py) program Test, debug, and execute the Python program Submit a copy of your commented source code on-line (10 pts.) Using a for loop, write a program that… read more

: Create a simple calculator 1.For this project, youll create

: Create a simple calculator 1.For this project, you'll create a form that accepts two operands and an operator from the user and then performs the requested operation. The design of the Simple Calcul… read more

Write an Assembly program that reads in a number of cents.

Write an Assembly program that reads in a number of cents. The program will write out the number of dollars and cents separately. Sample Run: ? 324 3 24 Write an Assembly program to read three numbers… read more

DescriptionWrite a C++ program that performs simple

Description Write a C++ program that performs simple integer arithmetic operations and displays the results in expression form. Your program will prompt the user to enter an operator. Valid operators … read more

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.

JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.

Web sites like justanswer.com/legal

...leave nothing to chance.

...leave nothing to chance.

Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.

Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.

I will tell you that...the things you have to go through to be an Expert are quite rigorous.

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

Los Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

Hesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

Kernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

Woodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

Elkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

Dallas, TX

< Previous | Next >

LogicPro

Engineer

14,482 satisfied customers

Expert in Python,Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Tutor

4,720 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

M.S.W. Social Work

2,850 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

Chartered Accountant

2,270 satisfied customers

Experience with chartered accountancy

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Jabi

Tutor

1,795 satisfied customers

I've been an Expert on JustAnswer since July 2010.

< Previous | Next >

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.