Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want Urgently in java Using Eclipse here the body of the code please fill please follow f your variable names are not descriptive of

I want Urgently in java Using Eclipse here the body of the code please fill please follow f your variable names are not descriptive of their use. If you have not included comments throughout your code. If your code is not properly indented. If your code is unnecessarily long or the logic you used is unnecessarily complicated. For each additional library import that was not originally given e.g. HashMaps, ArrayLists. Each import will attract an additional 10 mark penalty. Avoiding imports by using the full path to a class e.g. writing "java.util.Arrays.sort()" in the main body of your code. package questions; public class Album { private String albumName; private Photo primaryPhoto; //The photo used as the album cover private Photo[] photos; public String getAlbumName(){ return albumName; } public Photo getPrimaryPhoto(){ return primaryPhoto; } public Photo[] getPhotos(){ return photos; }/***(3 marks)* @param primaryPhoto - the photo used to set the instance variable ** This function should copy the primaryPhoto parameter value to the primaryPhoto * instance variable using a deep copy. To perform a deep copy you must create * a new Photo object which contains all the same values as the primaryPhoto parameter * variable. */ public void setPrimaryPhoto(Photo primaryPhoto){//TODO To be completed }/***(1 marks)* @param photos - the photo array used to set the instance variable ** This function should use a shallow copy to copy the photos parameter value to the * 'photos' instance variable. */ public void setPhotos(Photo[] photos){//TODO To be completed }/***(4 marks)* @param albumName - the albumName used to set the instance variable ** This function should ensure the following: *- The albumName should be between 1 and 20 characters (inclusive) in length *- The albumName should only contain uppercase, lowercase, digits and space characters ** If any of these are not followed, the function should return false and not * modify the previous albumName that was saved. Otherwise the function should * return true. */ public boolean setAlbumName(String albumName){//TODO To be completed return false; }/***(3 marks)* @param primaryPhoto * @param photos * @param albumName ** This constructor must: *- Use the passed values to set the appropriate instance variables *- Use the setters defined above ** No marks will be given unless all the setters above are used. * Full marks will be awarded if the constructor is defined correctly. */ public Album(String albumName, Photo primaryPhoto, Photo[] photos){//TODO To be completed }/*** DO NOT MODIFY ANYTHING BELOW!!! */ public Album(){}}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

What would you do?

Answered: 1 week ago