Find Jobs
Hire Freelancers

Write Java code for the description

$10-30 USD

Ditutup
Disiarkan sekitar 10 tahun yang lalu

$10-30 USD

Dibayar semasa penghantaran
Write a Java abstract superclass (call it MathExpression) that contains only an abstract instance method called evaluate() (NO PARAMETERS) which returns in a return statement a double. Write one subclass of MathExpression called MathValue. MathValue will have a private instance variable for a double (call it doubValue). Include the following instance methods:  constructor with one double parameter that assigns to the doubValue instance variable  override the evaluate() method to return doubValue  override Object's toString method that ONLY returns doubValue (in a String) Write another subclass of MathExpression, but abstract subclass called MathBinaryExpression which must have 2 protected instance variables for leftExpression and rightExpression (MathExpression objects variables). Include:  a constructor with 2 MathExpression parameters. Assign to each instance variable ONLY if the corresponding parameter is not null. If a parameter is null, assign (or leave) the default of a MathValue object with 0 value.  accessors (instance methods with no parameters that return a MathExpression, one for each instance variable) Write four subclasses of MathBinaryExpression called AddExpression, SubExpression, MultExpression and DivExpression. In each of these subclasses, include one constructor with 2 MathExpression parameters that calls the superclass constructor passing the parameters. Override the evaluate() method in each of these subclasses so that it returns the result of adding/subtracting/multiplying/dividing leftExpression operator rightExpression (be sure to call the correct methods to do this). Override Object's toString method to return the expression in a string in the form "( leftExp operator rightExp )". In a separate class & file, write a driver program (main) that declares an array of MathExpression objects, then do the following in main: CIS 35A Java Programming as a Second Language  Call a static method with NO parameters (in the same class as main's class) that creates an array of MathExpressions using user input (see A. below)  Call a static method to display the return value of toString() and the result of the evaluate() method for EACH element, but ONLY if the element isn't null. If an element is null, display a message "invalid expression".  Call a static method to return the count of how many elements in the array of MathExpression's are compound binary expressions (are MathBinaryExpression objects in which both of the leftExpression and rightExpression variables refer to MathBinaryExpression's)—you MUST use the instance of operator  Display the count (return value from the above method) * Be sure to find the array size every time you traverse the array (DO NOT use a hard-coded number for the size when traversing the array!) A. Read from the user how many math expressions will be entered (be sure to prompt first). After allocating memory for the array ( allocate default size of 1 if the input size is <=0), fill the array by doing the following for each element (then return the array):  Read a prefix expression into a String (to the end of line) in which each token is separated by white spaces.  Create a StringTokenizer using the input string (default delimiters)  Call another static method (see B. below, I'm calling it makeExpression) passing the StringTokenizer, and assign the return value to the next array element B. Instantiate the appropriate MathExpression (either AddExpression, SubExpression, MultExpression, DivExpression) recursively OR MathValue, then return it (hints are in Catalyst). If the StringTokenizer has no more tokens, then return null. Optional: Also check if there should be a number and it isn’t, OR if there are too many numbers, then return null. Also need the UML Diagrams for MathExpression, MathValue, MathBinaryExpression, AddExpression, SubExpression, MultExpression, DivExpression
ID Projek: 5554806

Tentang projek

28 cadangan
Projek jarak jauh
Aktif 10 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
28 pekerja bebas membida secara purata $28 USD untuk pekerjaan ini
Avatar Pengguna
Hi, I am Java expert and can surely help you here with this project. Please communicate so we can discuss it further. Thank you
$30 USD dalam 1 hari
4.7 (376 ulasan)
7.4
7.4
Avatar Pengguna
Hi, I'm an experienced java developer, and I'm interested in your project. Hope I can help, thanks.
$30 USD dalam 1 hari
5.0 (81 ulasan)
6.5
6.5
Avatar Pengguna
A proposal has not yet been provided
$30 USD dalam 1 hari
4.9 (111 ulasan)
6.4
6.4
Avatar Pengguna
Hello, I have 4 years experience in java. I can do this project. Please message me for further discussion.
$30 USD dalam 0 hari
4.9 (79 ulasan)
5.4
5.4
Avatar Pengguna
I can deliver the code and complete the assignment as per your description and details .
$30 USD dalam 1 hari
4.9 (21 ulasan)
5.5
5.5
Avatar Pengguna
Hi There, I can start the work now. I am senior application developer with 6 years experience. Please contact me if you are interested. Thank you. Best Regards, Sow
$30 USD dalam 0 hari
5.0 (15 ulasan)
4.4
4.4
Avatar Pengguna
Hello, I am a very good java programmer. I have worked on several project both for students and companies. I Have also worked on similar projects to yours. I can help you work on this perfectly and also support after deployment. Kindly respond so we can chat then work starts. Regards, Ayomide.
$30 USD dalam 1 hari
4.7 (21 ulasan)
4.7
4.7
Avatar Pengguna
I've got many years programming experiences, which your requirements are quite typical, I could make it very professional, good looking and easy to understand. please let me know if you need my help. thanks/denial
$25 USD dalam 1 hari
4.9 (6 ulasan)
4.3
4.3
Avatar Pengguna
Hi there, I would like to work on your project. For my delivered work and commitment, you can have a view of my portfolio and employer reviews. Please let me know for further discussion
$30 USD dalam 1 hari
4.2 (14 ulasan)
4.2
4.2
Avatar Pengguna
A proposal has not yet been provided
$30 USD dalam 2 hari
5.0 (8 ulasan)
2.8
2.8
Avatar Pengguna
I am ready to write your abstract class as per your requirement Thank you
$25 USD dalam 0 hari
3.1 (25 ulasan)
4.6
4.6
Avatar Pengguna
Sun Certified Programmer for Java 6.0 Platform. with 93%. Over 2+years of I.T. Experience. Excellent Development Skills : J2SE, HTML,JSP,SERVLET,J.D.B.C.,XML,STRUTS,HIBERNATE,SOAP,MYSQL,SQL SERVER. EXPERIENCE: Project :Contract base work------------------------------------------------------------------------------------ Develop Project for PCS NOIDA Project Name: Inflow Inventory –Online Using Skils: Jsp,servlet,java,Tomcate Appache,Strutts 2.1.3,Hibernate 3.0.1,mysql server Develop Project for TTS Solution. Project Name: Insight Insema –online Using Skills: ,servlet,java,Glass Fish,Strutts 2.1.3,Hibernate 3.0.1,mysql server Company Work---------------------------------------------------------------------------------------------- Permanent Employment Base Work-------------------------------------------------------------------- SwarnSoftware pvt ltd,Delhi February 2013 – to September 2013. as JAVA Developer Responsibility: Development of Windows Application and Web Application for client or business solution Provide a fast and secure application for easy use. And find the bugs in Application in the Various type pattern . Bidding on the freelancer market and increase sales of company Dealing with client and understanding client requirement. Complete all project before deadline. Gayatri Infotech pvt ltd, DelhiJanuary 2012 - January 2013as JAVA Developer/Trannier. Responsoblity: Develop Application on J2SE. Develop Application online – Understand the requirement fro
$111 USD dalam 2 hari
4.6 (7 ulasan)
3.2
3.2
Avatar Pengguna
hi, I can help you --------------------------------------------------------------------------------------------------------------
$30 USD dalam 1 hari
5.0 (9 ulasan)
3.1
3.1
Avatar Pengguna
Hi I am working as an android developer. I have done 6 years study in computers(BCA and MCA). I am Oracle Certified in Java also. I hope you will shortlist me for this job. I have one year experience in java also. Thanks
$25 USD dalam 1 hari
4.2 (5 ulasan)
2.5
2.5
Avatar Pengguna
Hello. My name is Valentin IONITA. I'm a Java software engineer with more than 3 years experience on object oriented software design and development. I am new in the freelancing business so I am willing to do your school project for minimal quote. My only requirement is if you are satisfied by our collaboration, to give me feedback on freelancer.com. Looking forward to hear from you. Regards, Valentin IONITA
$10 USD dalam 3 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
Ainda não foi fornecida uma proposta
$25 USD dalam 3 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
A proposal has not yet been provided
$35 USD dalam 2 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
I am working as a software developer in Elitecore technologies which is pure JAVA based company . So i have good knowledge of JAVA and i defenitely complete your work as per your satisfaction.
$15 USD dalam 2 hari
0.0 (0 ulasan)
0.0
0.0
Avatar Pengguna
A proposal has not yet been provided
$16 USD dalam 1 hari
0.0 (1 ulasan)
0.0
0.0
Avatar Pengguna
一个有效的提议尚未被提供
$30 USD dalam 3 hari
0.0 (0 ulasan)
0.0
0.0

Tentang klien

Bendera UNITED STATES
Santa Clara, United States
5.0
7
Kaedah pembayaran disahkan
Ahli sejak Mac 14, 2014

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.