If there are 4 command line arguments

Assignment Help JAVA Programming
Reference no: EM13164626

A quadratic equation ax2 + bx + c = 0 has three inputs (a,b,c) and two outputs (x1 and x2). We assume that x1 = r1 + i*t1 and x2 = r2 + i*t2, i=sqrt(-1).


Write an engine program for solving the quadratic equation that accepts inputs (a.b.c) as command line arguments.


If there are three command line arguments, the program should display the results (x1 and x2) on the screen.


If there are no command line arguments then the engine should prompt the user to enter a,b,c and then compute and display the results (x1 and x2) on the screen.


If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen). Write a master program that activates the engine using system(...) call and then retrieves results from filename.dat and displays them on the screen.

Reference no: EM13164626

Questions Cloud

When the jmpc field in the microinstruction is enabled : Assume that when the JMPC field in the microinstruction is enabled (set), MBR is ORed with NEXT_ADDRESS to determine the address of the next microinstruction to be executed
Write a program that prompts for and accepts input of test : write a program that prompts for and accepts input of test ggrades that are integers between 0 and 100. For each numerical test grade,  program should display a corresponding letter grade
A robot can take steps of 1 meter : A robot can take steps of 1 meter, 2 meters, or 3 meters. Write a recursive function to calculate the number of ways the robot can walk n meters. (n is an integer obtained from user.) As example:
Code works and does what it is suppose to do : Please make sure the code works and does what it is suppose to do. I keep getting answers on my other assignments that were copy and pasted from god knows where and had nothing to do with the assignment instructions.
If there are 4 command line arguments : If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen)
The factorial of a positive integer n, denoted by n! : Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....
Write a program to read a file and encode : Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name
Class polygon which draws a hexagon for a set of numbers : Write a class Polygon which draws a hexagon for a set of numbers given by the user. You must only use method drawLine of class Graphics (other fill or draw methods won't be accepted).
Using wireshark note the ip address and tcp port number : Using wireshark note the IP address and TCP port number used by your client computer (source) to transfer the file to any FTP server?

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Write java program to enter number of marks

Write a java program called AverageMark.java. This program should allow the user to enter any number of marks and then display the minimum, maximum & average mark.

  supply a student tester class that tests all methods

Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and methods getName( ), addQuiz(int score), getTotalScore( ), and getAverageScore ( ).

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Data structures and algorithms

Code analysis and programming.

  What is the minimal total weight of cylinders

A scuba diver uses a special equipment for diving. He has a cylinder with two containers: one with oxygen and the other with nitrogen. Depending on the time he wants to stay under water and the depth of diving the scuba diver needs various amount of ..

  Mvc pattern and servlet

When you use the MVC pattern, the controller directs the flow of control to

  Accepts a binary number from the user

Write a Java test program that accepts a binary number from the user. You should store the binary number in a String. Your program should then use afor loop to sequence through every character in the String, counting the number of ones, zeros, and..

  Write a program to register students for a college

Students have names, addresses and courses. Implement the interface class RegisterStudent. RegisterStudent has one method, public boolean register, which returns the boolean value of true or false if the student is successfully registered for the ..

  Image to a "black-to-green scale" image

Call a method that will change the image to a "black-to-green scale" image.

  Implementation of memory management

Implementation of memory management

  The frantic pipe layer game

Design the Frantic Pipe Layer game

  Write a java application to ask number of assignments

Write a java application that accomplishes the following tasks with built in exception handling: ask the number of homework assignment students have submitted in a semester

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd