Find Jobs
Hire Freelancers

Practice Program with Arrays

$10-30 USD

Selesai
Dibuat lebih dari 5 tahun yang lalu

$10-30 USD

Dibayar ketika dikirim
Design: You must have a minimum of a Vehicle class, CarLot class and TextMenu class, as well as a CarLotDriver class. Make sure your output is easy to read and formatted appropriately. A sample run has been provided. Vehicle Class: • Instance Variables: o VIN number o Make and model of vehicle o Year o Value of vehicle o Total miles driven o Miles of vehicle on last oil change o Vehicle Type, which should be stored as a character, either C or T • Methods: o Two constructors, one that takes the vin, make, model, year, value and vehicle type and the other that also includes total miles and last oil change miles o needsOilChange()- this method will determine if a vehicle is in need of an oil change. It returns a Boolean value based on the following criteria. A car requires an oil change if it is 3000 or more mile since last oil change and a truck is 10000 or more miles. o depreciate- this method accepts a double value that represents a percentage and returns the amount the vehicle value will be depreciated by, based on the depreciated percentage. o shouldRetire()- this method should return a Boolean value that determines whether a vehicle is ready to be retired based on the following criteria:  For a car: total miles is over 100,000 and more than 5 years old  For a truck: total miles is over 200,000 and more than 7 years old o toString()- See sample run for toString format o getCurrentYear()- This method retrieves the current year from the system and returns it as an integer. The code for this is: return [login to view URL]; You will then need to import the Calendar from java.util. o only the getters and setters that are actually used. CarLot class: • Instance Variables: o An array that stores Vehicles that represents the fleet of vehicles o A variable that represents the count for the number of vehicles • Methods: o Constructor- One constructor that instantiates the array and sets the count to zero o readFile()- This method accepts a string that represents the name of the file to be read. It will then read the file. It should work for either the car or truck file. Once the data is read, it should create a vehicle and then pass the vehicle to the addVehicle method. It should not allow any duplication of records. Be sure to handle all exceptions. o writeFile()- This method accepts a string that represent the name of the file to be written to and then writes the contents of the array to a file. This method should call a sort method to sort the array before writing to it. o sortArray()- This method returns a sorted array. The array is sorted by vin number. o addVehicle()- This method accepts a Vehicle instance and adds this vehicle to the fleet(the array) only if the vehicle is not already in the list. o displayFleet()- This method outputs all of the vehicles that are in the fleet. o displayOilChangeList()- This method outputs all vehicles in the array that require an oil choice o updateMiles()- This method accepts a vin and miles and updates the total miles for the designated vehicle based on vin o updateOilChange()- This method accepts a vin and changes the oil change miles to the current miles. o depreciateFleet()- This method accepts a percentage value and calls the depreciate method for each vehicle in the fleet and updates the values for each vehicle. o displayVehicle()- This method accepts a vin and searches the array for a vehicle that matches that vin and displays the information about that vehicle. o removeVehicle()- This method accepts a vehicle and searches the array for that vehicle. For each item that doesn’t match, it will copy the contents to the new array. It will not copy the contents of the vehicle that is found. In other words, all vehicles in the array will be moved up a position to fill in the gap in the array.
ID Proyek: 18322187

Tentang proyek

7 proposal
Proyek remot
Aktif 5 tahun yang lalu

Ingin menghasilkan uang?

Keuntungan menawar di Freelancer

Tentukan anggaran dan garis waktu Anda
Dapatkan bayaran atas pekerjaan Anda
Uraikan proposal Anda
Gratis mendaftar dan menawar pekerjaan
Diberikan kepada:
Avatar Pengguna
I have 3 years of working experience in Java and I can do this task easily. Looking forward for a positive response from you.
$25 USD dalam 1 hari
5,0 (30 ulasan)
4,5
4,5
7 freelancer menawar dengan rata-rata $36 USD untuk pekerjaan ini
Avatar Pengguna
hello,how are you.i read your bid carefully. i am java/javafx expert and have full experience for 12 years. java/javafx is my top skill and passision. i can provide most quality and high speed. if you want to success, please contact me. Then, I will give you good result. hire me.
$100 USD dalam 1 hari
5,0 (27 ulasan)
6,9
6,9
Avatar Pengguna
Hello Sir, Greetings, A Java expert developer is here I have good advanced expertise in Java I can help you with your work in Java This is an initial bid Sir, Feel free to message me Regards
$20 USD dalam 1 hari
4,9 (232 ulasan)
6,8
6,8
Avatar Pengguna
Hi, nice to meet you, i can help you with the Java assigment, im good with OOP and files, please contact me if you need the job, we can discuss details and payment in chat
$25 USD dalam 1 hari
5,0 (39 ulasan)
5,4
5,4
Avatar Pengguna
Hi i have two year experience in web and app development field. i am new to freelancer but not in technology So please give me a chance to work with your project Thanks.
$25 USD dalam 1 hari
5,0 (6 ulasan)
2,5
2,5
Avatar Pengguna
Hello! I am the man for this job. My name is Rupesh and I am Computer Engineering graduate. I have been programming in Java for almost 3 years and since everybody tells me I am good at solving problems, I have decided to spearhead my passion. I have a good experience working with Core Java along with Java Spring, Jersey JAX-RS for Restful services. I have good knowledge of design patterns as well. I can assure you that I will be able to assist you in your task in time with quality work. For communication, I am always available on email and Skype. I am free to be available for any types of communication methods and able to maintain your time schedule during the project is on. I am waiting to be hired for this project to show my skills. Thank you. Regards, Rupesh Karn
$25 USD dalam 7 hari
5,0 (1 ulasan)
1,0
1,0
Avatar Pengguna
Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have checked your requirements. We have right skills to work on this assignment. We are a team of professionals including experienced analysts, designers, project managers, developers and QA people having great expertise in web applications development mainly on core PHP, PHP with open sources (Joomla, Wordpress, Codeigniter, Cake PHP), .NET, Asp.NET, Vb.NET, HTML 5 etc. and mobile applications on ios and Android platform. Our award = superb result = happy client. In a good partnership, good results happen. Good cooking makes good eating!BWe consider our client as our partner. I am ready to discuss with you with best Regards
$29 USD dalam 7 hari
0,0 (1 ulasan)
0,0
0,0

Tentang klien

Bendera UNITED STATES
Normal, United States
4,5
3
Memverifikasi Metode pembayaran
Anggota sejak Apr 13, 2017

Verifikasi Klien

Terima kasih! Kami telah mengirim Anda email untuk mengklaim kredit gratis Anda.
Anda sesuatu yang salah saat mengirimkan Anda email. Silakan coba lagi.
Pengguna Terdaftar Total Pekerjaan Terpasang
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuat pratinjau
Izin diberikan untuk Geolokasi.
Sesi login Anda telah kedaluwarsa dan Anda sudah keluar. Silakan login kembali.