Nhờ dịch đề bài OOP

m.n giúp em phần này với. em đọc k hiểu rõ lắm.

• A media archive method can be called with a string as a parameter indicating a media type. If there is no media for this type, a corresponding error message will be displayed. Should the type be present, e.g. “CD” calls the toString () method of all CDs managed in the Media Archive.
• The media archive provides a method that counts all media of each type. An example output might look like this: “The stock of the media archive currently includes 20 USB sticks, 11 CDs, 44 LPs and 9 compact cassettes”.

Bạn up cả đề lên nhé. Đây là 1 phần của câu hỏi.

6 Likes

dạ đây ạ.

1.Project description
You work in a media archive and have the task to expand the EDP system. Your supervisor will give you the following description of the organization and tasks of the media archive. You should develop a Java program from the description that covers all the scenarios described below.
The media archive has music recordings on the following media: CDs, USB sticks, compact cassettes and LPs. The media have partly different characteristics:
• A CD can be writable (attribute).
• A USB stick has a format such as NTFS, ext4, FAT, FAT32
• A Compact Cassette may be single-sided or double-sided.
• An LP has a diameter and a given rotation speed.
The archived CDs and USB sticks are digital media that have a data size. The other two media are analog media and can be recorded in stereo or mono. The digital and analog media store audio files that have a name and are created by an artist. In addition to the number of pieces of music, the total playing time of the stored pieces of music of each audio medium is relevant.
All music is managed in a central media archive, which performs various tasks. Information about existing media must be backed up regularly and stored elsewhere. For this purpose the media archive has the possibility to create a list of all media.

  1. Task-position
    • All media override the toString () method, which returns a string with a concise listing of all attribute values (status of the object). The media archive offers the possibility to output the status information of all archived media on the console.
    • A media archive method can be called with a string as a parameter indicating a media type. If there is no media for this type, a corresponding error message will be displayed. Should the type be present, e.g. “CD” calls the toString () method of all CDs managed in the Media Archive.
    • The media archive provides a method that counts all media of each type. An example output might look like this: “The stock of the media archive currently includes 20 USB sticks, 11 CDs, 44 LPs and 9 compact cassettes”.
    • Create a UML class diagram
    • Include Javadoc comments in your code.

2.1 Mandatory framework conditions
• Inheritance is used when modeling the classes.
• If the archive can accommodate new media types at a later time, a list of objects of the abstract media type is saved

đôi chỗ không đúng lắm nhưng mong bạn hiểu cho

  1. Miêu tả dự án
    Bạn đang làm cái công cụ là công cụ lưu trữ phương tiện(media archive dịch ra là vầy còn tùy ngữ cảnh) và có tính năng của nó là mở rộng dung lượng của hệ thống xử lý dữ liệu. Người quản lý của bạn sẽ mô tả hướng đi của tổ chức và tính năng của công cụ lưu trữ phương tiện. Bạn cần phải phát triển 1 phần mềm bằng java từ cái hướng đi đó. Hướng đi được mô tả như sau:

Công cụ nói trên có những thứ có thể lưu tệp nhạc được như: CD, USB, Cát-xét, Đĩa than. Mỗi cái có một đặc điểm riêng của nó:

  • CD có thể ghi lại được
  • USB có nhiều định dạng nơi lưu trữ như NTFS, ext4, FAT, FAT32
  • Cát-xét có thể sử dụng 1 chiều hoăc 2 chiều
  • Đĩa than có đường kính và tốc độ quay nhất định

Lười lắm! Còn lại mai dịch nốt

2 Likes

mình đang làm rồi nhưng đến chỗ này mình k biết viết code như nào. Mình k hiểu đề cho lắm.

• A media archive method can be called with a string as a parameter indicating a media type. If there is no media for this type, a corresponding error message will be displayed. Should the type be present, e.g. “CD” calls the toString () method of all CDs managed in the Media Archive.
• The media archive provides a method that counts all media of each type. An example output might look like this: “The stock of the media archive currently includes 20 USB sticks, 11 CDs, 44 LPs and 9 compact cassettes”.

1 Like

Mình thấy bạn có hỏi 1 bài khác ở đây: toString trong java

Để có thể làm đúng đc yêu cầu bước đầu tiên phải thiết kế các class đúng theo đề bài đã.
Dịch thì bạn có thể dùng google dịch, hoặc bất kì phương tiện nào, nhiều lắm nên mình sẽ không dịch toàn bộ mà chỉ note lại những thứ cần quan tâm:

The media archive has music recordings on the following media: CDs, USB sticks, compact cassettes and LPs.

=> Bốn đối tượng CD, USBStick, CompactCassettesLP sẽ kế thừa 1 đối tượng abstract là Media

The media have partly different characteristics:
• A CD can be writable (attribute).
• A USB stick has a format such as NTFS, ext4, FAT, FAT32
• A Compact Cassette may be single-sided or double-sided.
• An LP has a diameter and a given rotation speed.

=> Mô tả các field trong từng đối tượng

The archived CDs and USB sticks are digital media that have a data size

=> CD, USBStick extends DigitalMedia extends Media. Trong DigitalMedia có 1 field là dataSize

The other two media are analog media and can be recorded in stereo or mono

=> CompactCassette, LP extends AnalogMedia extends Media. Trong AnalogMedia có 1 field là recoredType

The digital and analog media store audio files that have a name and are created by an artist. In addition to the number of pieces of music, the total playing time of the stored pieces of music of each audio medium is relevant.

=> Chính là thông tin của đối tượng tổng quát nhất Media: name, createdBy, numberOfMusic, totalPlayingTime

All music is managed in a central media archive, which performs various tasks. Information about existing media must be backed up regularly and stored elsewhere. For this purpose the media archive has the possibility to create a list of all media.

=> Tạo một đối tượng MediaArchive chính là đối tượng sẽ thực hiện các công việc lq đến các Media nói trên. Nó chứa 1 List các Media

All media override the toString () method, which returns a string with a concise listing of all attribute values (status of the object). The media archive offers the possibility to output the status information of all archived media on the console

=> Khá đơn giản, có thể dịch được

A media archive method can be called with a string as a parameter indicating a media type. If there is no media for this type, a corresponding error message will be displayed. Should the type be present, e.g. “CD” calls the toString () method of all CDs managed in the Media Archive.

=> Trong MediaArchive có 1 phương thức xxx có tham số truyền vào là kiểu của media. Nếu tham số truyền vào không tương ứng với một media nào, sẽ thông báo lỗi. Nếu có, ví dụ như tham số là “CD” sẽ tương ứng với kiểu đối tượng CD, thì MediaArchive sẽ gọi hàm toString() của tất cả các đối tượng CD có trong list.

The media archive provides a method that counts all media of each type. An example output might look like this: “The stock of the media archive currently includes 20 USB sticks, 11 CDs, 44 LPs and 9 compact cassettes”

=> Đếm xem trong list có bao nhiêu media từng loại.

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?