Find Jobs
Hire Freelancers

Java script micro project - 19/05/2020 10:56 EDT

$10-30 USD

Terminado
Publicado hace casi 4 años

$10-30 USD

Pagado a la entrega
Design an abstract class named Fruit that has the following fields:  nameOfFruit for storing a fruit’s name  fruitsCountry fruit’s origin country. In addition, the class should have the following constructor and other methods:  Constructor with arguments to initialize both data fields.  A toString method to return a String containing the fruit’s data.  An abstract method named color() for fruit’s color and hold a void type.  An abstract method getInterExport() that hold an int type. Then, design a class named Apple which extends the Fruit class. It declares three final integer fields with their values as: FUJI = 2000, GALA = 4500 and CAMEO = 3000. These fields hold the total apples according to it types. The class also declares three integer fields to indicate the apples that have been allocated for local distribution. Declares the three fields as, localFuji, localGala and localCameo. Next, provide the Apple constructor by calling the constructor of the superclass (Fruit) through the super keyword. After that, provide the mutator (set) methods to store values in localFuji, localGala and localCameo fields. Finally, Apple class will override: o Abstract color() method defined in Fruit class. In this method, print the color of apple fruits as red sport, ultra red and red in one line. o Abstract getInterExport() method defined in Fruit class. In this method, declare two integer variables called totalApple and totalExport. totalApple hold the total amount of apples and totalExport hold total apples to be exported after deduction with apples for local distribution. To calculate the totalApple, add all final integer fields. To calculate the totalExport, deduct totalApple with localFuji, localGala and localCameo. Return the totalExport. o A toString method defined in Fruit class and also displays Fuji, Gala and Cameo apple for local distribution. Provide ExportAppleDemo class to demonstrate the Fruit and Apple classes. Example of the program output is given: Output: Name of fruit: Apple New Varieties Origin Country: New Zealand Fuji apple for local distribution = 1200 Gala apple for local distribution = 900 Cameo apple for local distribution = 1500 Apples color: red sport, ultra red and red Apples for international distribution: 5900
ID del proyecto: 25587934

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 4 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hello, I've been using Java for more 5+ years, I can make your project in no time, I've already done a lot similar projects before, Feel free to ask me anything, Thank you, Oualid H.
$15 USD en 1 día
5,0 (15 comentarios)
3,8
3,8
4 freelancers están ofertando un promedio de $26 USD por este trabajo
Avatar del usuario
I have well experienced in doing such kind of jobs................................................................
$50 USD en 2 días
5,0 (4 comentarios)
3,8
3,8
Avatar del usuario
Hello. I'm knowledgeable about Java, and I'm confident that I can deliver this project to you in a brief amount of time. Let's chat so that we may reach an agreement.
$15 USD en 1 día
5,0 (18 comentarios)
3,5
3,5
Avatar del usuario
Hi, I am a developer and designer with 5+ years of experience in C#, Excel, VBA, HTML, Css and javascript I am new to this freelancer platform but I can guarantee my work. Let's connect on chat for detail discussion. Looking forward to working with you. Thanks and Regards, Bhoomi
$25 USD en 7 días
5,0 (1 comentario)
2,0
2,0

Sobre este cliente

Bandera de MALAYSIA
Kemaman, Malaysia
5,0
2
Miembro desde abr 19, 2020

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.