Find Jobs
Hire Freelancers

Write Java Software

$10-30 USD

ที่ทำเสร็จแล้ว
โพสต์ มากกว่า 7 ปีที่ผ่านมา

$10-30 USD

ชำระเงินเมื่อส่งงาน
**Would have to be completed with 12 hours** Create a Java class using generics: Trio. ◦ Objects of this class hold three unordered items of the same type.  ◦ A Trio object is unordered. ◦ For example, the Trio (3, 4, 5) is considered the same as the Trio (4, 5, 3) and the Trio ("hi", "bye", "hello") is considered the same as the Trio ("hello", "hi", "bye"). ◦ The order doesn't matter. (This is like a set in mathematics.) ◦ Use generics to ensure that the three objects are of the same type.  ◦ For example, a Trio can hold three Integers or it could hold three Strings or it could hold three Students, etc. ◦ A Trio could not, however, hold two Integers and a String. ◦ Write this class using generics. Here is the class header: public class Trio<T> Requirements Your class must compile (10 points) and have the following: ◦ (10 points) instance data for the three items ◦ (10 points) a constructor to create the object by sending three items as parameters ◦ (10 points) getters and setters for each item in the trio ◦ (10 points) a toString method that returns a text representation of the trio  ◦ (15 points) a contains method that returns whether or not the trio contains an item sent in as a parameter ◦ (15 points) a method called sameItems that returns true if the three items are the same as each other, meaning they are equal to each other (not aliases, but equal- logically equivalent), and false otherwise ◦ For example, invoking sameItems on the Trio (3, 3, 3) will return true. Invoking sameItems on the Trio (3, 4, 4) will return false. ◦ (20 points) an equals method that overrides the equals method of the Object class. ◦ The method returns true if the current Trio holds the same three items in any order as the Trio sent as a parameter and false otherwise. Extra Credit (20 points) ◦ implement the Comparable interface ◦ order Trio objects by the smallest item in each Trio ◦ For example, (3, 1, 4) is less than (2, 6, 4) because the smallest item in the first Trio (1) is less than the smallest item in the second Trio (2) ◦ Hint: make a private helper method to find the smallest item in any Trio. ◦ Note that there are other ways you could reasonable compare Trio objects- but this is the way you are required to do it for the extra credit. ◦ To compile, change the class header and method header to the following. ◦ Essentially, these changes mean that you are requiring the data type T to implement Comparable as well. ◦ That matters because it means you can invoke compareTo on the items in the Trio! ◦ The "?" is called a wildcard and is related to bounds in generics. This is not information you are responsible for in our course. For now, you can just use it. public class Trio<T extends Comparable<? super T>> implements Comparable<Trio <T>> public int compareTo(Trio<T> otherTrio) { Testing and Submission I have provided a driver program that you can use to test your class. You might want to add additional code, but you can use this driver program as a starting point for testing. Review the Assignment Submission Guidelines. Most importantly, make sure your code compiles- code that does not compile will receive a zero. If submitting as a group, submit one assignment only through one group member's Insight account. Put the names of all group members in Java comments at the top of each Java file.
รหัสโปรเจกต์: 11400527

เกี่ยวกับโปรเจกต์

3 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 8 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี
หมอบหมายให้:
รูปอวาตาร์ของผู้ใช้
Hello. It is easy project, it is possible to complete in 2-3 hours of pure working time, maybe even little sooner.
$11 USD ใน 1 วัน
4.9 (1008 รีวิว)
6.3
6.3
3 ฟรีแลนซ์กำลังเสนอราคาโดยเฉลี่ย $20 USD สำหรับงานนี้
รูปอวาตาร์ของผู้ใช้
Hello the, Very very very easy work for me, award me this work to me and I will do your work within 6 hours, Feel free to inbox me now for further discussion.
$15 USD ใน 1 วัน
0.0 (0 รีวิว)
0.0
0.0

เกี่ยวกับลูกค้า

ปักธงของ UNITED STATES
San Francisco, United States
5.0
6
ยืนยันวิธีการชำระเงินแล้ว
เป็นสมาชิกตั้งแต่ ส.ค. 24, 2016

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง