Java Project

Hi, My name is Francisco, I am new in Java and have this project due this week can someone really help me, I am really struggling with this project. I am using IDE (NETBEANS) for developing this application. I really appreciate if someone can help me. Below is the project requirements.
Thank so much.
This practical work is to write a media management software suite. It stores details of your photos, music and movies (at least these three).
There is a need to standardise three names for software swapping. You should adhere to the following:
* the front end package should be called frontend
* the back end package should be called backend
* the interfaces Storage and Storable to be declared in a separate package called utilities
* the primary class implemented in the back end (the one that implements storage) should be called Database
You should spell these identifiers exactly as above, otherwise your frontend/backend will not swap with other components.
Detail
The project must be written using two separate packages, a front end and a back end. The front end interfaces with the user, takes input requests and returns results. Typical commands would be:
* add/photo
* add/soundTrack
* search all for titles containing "river"
* seacrh all for artist containing "river"
* delete a particvular item.
Each entry in the system should have a title, date of entry and notes. Additionally, music should have an artist, and movies should have a length of movie entry.
The back-end provides the storage, and will simply use a Vector, configured as a Vector<Entry> or similar. This separation of systems in to front and back end (user interface and the database) is a common feature of modern large-scale software.
Interfacing
The front end and the back end will "talk" to each other using an interface. This interface will be standard and is specified here. This interface will be extended during the next week, but will be fixed after the lecture on October 25th.
Classes to be stored in the back-end will implement the Storable interface. It may be a tagging interface, but designers may extend it as required.
interface Storable {
// designers may add requirements here
The main back-end class will implement the Storage interface. It must not be modified after the due date for setting it (you will find out why later).
interface Storage {
void add(Storable s);
void delete(Storable s);
void saveDatabase(String s); // saves database to file specified by String
void loadDatabase (String s); // load the database
// iterate through the database
void reset(); // reset
boolean hasMore(); // if there is another element available for the next() method
Storable next(); // get the next item
Input/output
Output (display to the user) should be on-screen using JFrames, JPanels etc. You should mainly write text [g.drawChars("... ], but a bit of colour (a graphic in a separate JPanelto distinguish photos from music etc) is a requirement.
Input should be using the Scanner class.
You can improve the input & output by adding GUI components (buttons, textboxes etc) either by directly using Swing components or by using the Form generator in Netbeans. But if you do this, then it's up to you. In particular, event handling in Java -which you will need to understand if you use the Swing components directly - is fairly complex (but well covered in the tutorial). Note that the full GUI interaction - including event handling - is covered in HIT212.
Options
For small amount of extra marks:
* Input using JOptionPane (see API and tutorial)
* Input using a text box (see Using Text Components in the Java tutorial).
* Using buttons etc (the full GUI)
It will jazz your presentation up, but if you want to avoid a bit of extra research, or are having trouble with the concepts, avoid the last two options. The full GUI is taught in the next subject and - in particular - you will have to understand Java's model for event-handlers and event-listeners. It's all in the tutorial, but will not be discussed in class or tutorials.
Saving the database
Assuming the database is saved as a Vector of Storables, the whole Vector may be saved by defining an ObjectOutputStream:
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("C:/..."));
The Vector (assume it is called store) is then put to disc by the following code:
oos.writeObject(store);
oos.close();
Reading the database back in is as simple. Just define an ObjectInputStream. See the API (ObjectOutputStream, ObjectInputStream) for details.
[Hint: Not all Objects can be written to disc - for security, by default objects cannot be written to disc. If a designer intends objects to be written, they must implement the tagging interface Serializable. Look up Serializable in the API]
Requirements
* Storage must be implemented using a Vector.
* There must be two distinct packages - backend and frontend. These must be implemented as Java packages.
* All classes to be stored must implement the Storable interface (which may be modified)
* The back end must implement the Storage interface (which cannot be modified).
* Group size of one or two. Individuals can identify the code areas they primarily wrote.
Marking criteria
The following criteria will be used
* Good coding style, methods short and clear, good variable naming, follows Java naming conventions
* Interfaces used as specified. All front-end/back-end communication enforced through the storage class

Don't sit on your thumbs waiting for magic to happen. Also, nobody here is going to do your homework for you. If you have some succinct, specific, java-related questions you might get somewhere. As it is right now, you're going nowhere in a hurry.

Similar Messages

  • How to use BO SDK in local java project?

    Hi,
    I am trying to connect BO system using below mentioned code
    public void main(String args[]) throws SDKException {
         try
              System.out.println("main");
              /ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();/
              IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( "Administrator","","BOSAP","secEnterprise");
              IInfoStore boInfoStore =(IInfoStore) boEnterpriseSession.getService("InfoStore");
              ChangePWD(boEnterpriseSession, boInfoStore);
         }catch(Exception e)
              System.out.println("Exceptions in main");
              System.out.println(e);
    This code was taken from below mentioned thread:
    Force all users to change their Enterprise passwords with a batch operation
    I have created standalone java project and running as JAVA application in eclipce. I am getting class def not found error for these BO SDK jar files. I have added
    cecore.jar
    celib.jar and
    cesession.jar files as external lib to java project
    I am using following imports
    import com.crystaldecisions.sdk.framework.CrystalEnterprise;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.exception.SDKException;
    import com.crystaldecisions.sdk.occa.infostore.*;
    import com.crystaldecisions.sdk.occa.infostore.IInfoObjects;
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    import com.crystaldecisions.sdk.plugin.desktop.user.IUser;
    Does any one know solution to fix class def not found error?
    Thanks
    Nitesh Shelar

    I did some mistake few dependent jars were missing in project build path. After adding those missing BO jar files. Now its giving server connection error. Which I am trying to resolve.
    Thanks for your help.
    Nitesh Shelar

  • I m not able to create xml file in Java Project

    hi all,
    I have created one java project just to try with Ant Builder. I have created one class inside it. and now i m creating an XML file inside that project.
    But as soon as i try to create the File -> New -> File and give the .xml extention of the file this gives error into the project.
    Will you suggest me the solution for that?
    Thanks in advance.

    Assuming that you are facing this problem in NDS, here is the solution.
    Go to Windows--> Preferences --> WorkBench -->File Associations
    In the File Types list select *.xml
    This will display the default associated XML editor as
    XML Editor(default) in the bottom list box.
    Click on add button near the bottom list box and select Text Editor, click Ok.You will see one more entry in the list box as "Text Editor".
    Select this entry and click on the default button.
    Click Ok and close the preferences dialogue.
    Now create a new xml file.You wont see the error this time.
    Please note that this will treat all simple xml files you will create as TEXT Files and always open with Text Editor.You can override this behaviour with right click on the file and select appropriate editor from the "Open With" context menu.
    The error you are talking about is because the XML editor tries to check well-formedness and basic syntax rules for the file that you newly created, actually is a noce feature of the IDE.
    Rgds,
    Amol

  • [ot] A UML tool for a new Java project

    I am working on the new Java project and need a UML tool to get it start. I am wondering whether anyone one can recommend such tool or not. It can be either stand alone or as an Eclipse plug-in. It shall be able to handle at least 50 classes.
    Thanks.

    Is it any good? I haven't tried it but we're
    evaluating UML tools here and it's on my list to play
    with.
    PS.If you mean SDE....
    I have only used the personal edition at home, and the other versions have more functionality available
    My impressions, FWIW, are
    - easier to use than rational rose (I find this one which I have to use at work to be a pain), although, paradoxically enough, they are not that dissimilar in appearance
    - I was able to create some reasonably complex models without any problems
    - easy to install and start using - no great learning curve
    - I tried importing a model I had exported from rose and that did not work very well at all.
    - this applies to version 2.2

  • Best Practices for Defining NDS Java Projects...

    We are doing a Proof of Concept on using NDS to develop non-SAP Java applications.  We are attempting to determine if we can replace our current Java development tools with NDS/WAS.
    We are struggling with SAP's terminology and "plumbing" for setting up/defining Java projects.  For example, what is and when do you define Tracks, Software Components, Development Components, etc.  All of these terms are totally foreign to us and do not relate to our current Java environment (at least not that we can see).  We are also struggling with how the DTR and activities tie in to those components.
    If any one has defined best practices for setting up Java projects or has struggled with and overcome these same issues, please provide us with some guidance.  This is a very frustrating and time-consuming issue for us.
    Thank you!!

    Hi Peggy,
    In Component Model we divide software projects into small components.Components can use other components in well defined manner.
    A development object is a part of a component that can be changed or developed in some way; it provides the component with a certain part of its functionality. A development object may be a Java class, a Web Dynpro view, a table definition, a JSP page, and so on. Development objects are always stored as “sources” in a repository.
    A development component can be defined as a frame shared by a number of objects, which are part of the software.
    Software components combine components (DCs) to larger units for delivery and deployment.
    A track comprises configurations and runtime systems required for developing software component versions.It ensures stable states of deliverables used by subsequent tracks.
    The Design Time Repository is for versioning source code management. Distributed development of software in teams. Transport and replication of sources.
    You can also find lot of support in SDN for the above concepts with tutorials.
    Refer this Link for a overview on Java development Infrastructure(JDI)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/java development infrastructure jdi overview.pdf
    To understand further
    Working with Net Weaver Development Infrastructure :
    http://help.sap.com/saphelp_nw04/helpdata/en/03/f6bc3d42f46c33e10000000a11405a/content.htm
    In the above link you can find all the concepts clearly explained.You can also find the required tutorials for development.
    Regards,
    Vijith

  • How to run a java project based on x86 Windows XP on Windows CE?

    I am a freshbird of J2ME and i am very confused these days.I beg you can look this topic thoughout.
    I used to configurate a Java Project File about SIP&VOIP successfully,and I can run it well on my PC .
    Now I want to migrate the project to a Mobile OS,and problems comes.
    I have installed the Windows CE 5.0 Evalution Edition on my machine(Windows XP SP2) and it works fine.I search it online for days ,and I download almost all related including CLDC(j2me_cldc-1_1-fcs-src-winunix.zip),MIDP(midp-2_0-fr-spec.zip<==Maybe this is not the right one beacuse it don't have a bin folder),and J2ME Wireless Tool KIt(j2me_wireless_toolkit-2_2-ml-windows.exe).
    I have configrate the enviroment-variable already , but I don't kown what to do next . Do you kown? I would be very thankfull.

    You need to completely rewrite the app to use the mobile APIs as they're very different from the PC ones, I suppose.

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • Getting an error in Java Project in SAP NetWeaver Developer Studio

    Hi,
    I am getting this error in my Java Project developed in SAP NetWeaver Developer Studio.
    Exception occurred during launch Reason: Source locator does not exist org.eclipse.jdt.debug.ui.javaSourceLocator
    Is this problem of not defining some External .jar file or problem with Eclipse?
    I am developing Java Project which connects with SAP Master Data Management.
    I am referring to a PDF named "How To identify identical master data records using SAP MDM 5.5
    Java APIu2019s".
    Regards
    Kaushik Banerjee

    This may be because of the metadata(registry) cache when it was written out by a second instance of NWDS.
    So the plug-in appears in the file system but NWDS doesn't see it in the metadata
    Delete the .metadata file from your workspace and then start up NWDS. It might work.
    Regards,
    PG
    Edited by: PG on Dec 16, 2008 3:18 PM

  • [Urgent] using javafx object in java project

    Suppose I here created a very simple java project and the main file is like below,
    public class test {
        public static void main(String[] args){
                System.out.println("Hello World!");
    }and in this particular java project, I need to use another javafx object which is defined as (the javafx and java file are in the same package),
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    var stage: Stage = Stage {
        title: "Declaring Is Easy!"
        scene: Scene {
            width: 300
            height: 250
            content: [
                Circle {
                    centerX: 150  centerY: 120 radius: 80
                    fill: Color.MAROON
                    stroke: Color.INDIANRED
                    strokeWidth: 10.0
                }, //Circle
                Rectangle {
                    x: 25, y: 80 width: 250, height: 80
                    arcWidth: 20 arcHeight: 20
                    fill: Color.web("#6699ff")
                    stroke: Color.web("#003399")
              strokeWidth: 5.0
                } //Rectangle
            ] //Content
        } //Scene
    } //StageSo how could I achieve this?
    Regards.

    Thanks for your reply.
    But would you please elaborate on this sentence: create the fx class using Class.forName("....").newInstance()?
    Indeed I implemented an interface which was extended by the javafx class, and in the main java file I need to write following codes to use this object,
    Context context = FXLocal.getContext();
            FXClassType instance = context.findClass("packageName.JavaFXClass");
            ObjectValue obj = (ObjectValue)instance.newInstance();
            JavaInterface ji = (JavaInterface)obj.asObject();The problem that I encountered right now is, the exception was thrown at context.findClass("javatest.MyChart");, since it's not able for the compiler to find the JavaFXClass.class.
    I checked the folder build\classes\packageName and noticed that both my main JavaClass and JavaInterface have been compiled with .class file, while the JavaFXClass was not, which means the file JavaFXClass.class doesn't exist.
    What's the solution?

  • How to open java files in a java project

    hi ,
    i have to implement a java program analyzer and now i have implement a java parser using javaCC. My parser parse a java file at a time and i have to read and parse all java files in a java project. my idea is to enter
    java project name *.jpx as an input and search java files in project and parse them one by one, or , to enter the folder path of java source files of project and parse them.
    i am a beginer of java language and i don't know where to start to do it.
    is there someone tell me which way is easier and better for my case and some ways to implement it. i search sample files that is similar to my case but i cannot find any.
    thanks in advance.
    ami

    if u don't mind , can u tell me which tutorial i
    should read for that? http://java.sun.com/docs/books/tutorial/essential/io/
    This... for example.
    xH4x0r

  • How to Debug a Java Project in Eclipse using Tomcat6.0

    Hi
    Can anybody help me with the following questions.
    1.How to create a java project in eclipse(I am using jsp,servlets,jsf,spring,jasper,struts).
    2.How to debug my application in Eclipse Europa by putting break points.
    3.how should i add Tomcat6.0 to my project in order to debug my application so that i can put break points while running the applications and observe the values.
    Thanks
    Bala

    You may find this tutorial useful regarding to JSF, Eclipse and Tomcat: http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html
    To put breakpoints, just doubleclick on the left gray rule of the code, you'll get blue bullets at the left rule, indicating a break point. Run Tomcat in debug modus (rightclick Tomcat � debug). Use the Eclipse debug perspective to step in the code (window � open perspective � debug).

  • Open Forte for java project in Sun java studio enterprise

    Hi Everyone, I am new to Java development. I have a java application developed in Forte for java 4 and I need to open and compile it in Sun java studio enterprise. Could anybody tell me how to do that? Thank you very much.

    The recent versions of the IDE (starting with NetBeans 4.1 and JSE 8) are based on a more-robust project system that is ant based. Projects from Forte for Java 4, unfortunately, cannot be directly opened in JSE8, NB4.1 and later.
    If you do have access to the original source code, pl. try the following in the latest version of JSE or NetBeans:
    - Create a fresh project in jse using File | New Project. (For a java standalone app, you would choose General | Java Application from the dialog).
    - Add the existing files to the empty project. You can do so by right-clicking on the project, selecting properties and adding the existing source directories under 'Source Packages' in 'Sources' category.
    Or from the new project dialog, you could select 'General | Java Project with existing sources' option.

  • Using a java project in a web which is part of a ear

    hi
    i have an ear (jspkeepEAR) that includes a web project (jspkeep). The web project uses a java project (common).
    I don't want the EAR to know about the common, so i've added the common as a j2ee module to the web project.
    when publishing, i can see under
    C:\bea92\user_projects\w4WP_workspaces\Untitled\.metadata\.plugins\org.eclipse.core.resources\
    .projects\jspkeepEAR\beadep\workshop\jspkeepEAR
    the .beabuild.txt file:
    C\:/bea92/user_projects/w4WP_workspaces/Untitled/jspkeepEAR/EarContent/APP-INF/classes = APP-INF/classes
    C\:/bea92/user_projects/w4WP_workspaces/Untitled/jspkeep/WebContent = jspkeep.war
    C\:/bea92/user_projects/w4WP_workspaces/Untitled/jspkeep/build/classes = jspkeep.war/WEB-INF/classes
    C\:/bea92/user_projects/w4WP_workspaces/Untitled/jspkeep/build/jws/.src = jspkeep.war/WEB-INF/classes
    C\:/bea92/user_projects/w4WP_workspaces/Untitled/common = jspkeep.war/WEB-INF/lib/common.jar
    the problem is, when i'm surfing to a servlet in the web, i get NoClassDefFoundError for classes in the common.
    I've also noticed that if i publish the web project by itself (and not as part of the ear), it works fine.
    any idea?
    thanks
    yair
    Edited by reformy at 12/12/2006 2:24 AM

    Hi Yair
    It appears that WLS only supports mapping a directory to a jar in APP-INF/lib/
    C\:/runtime-New_configuration/Common/bin = APP-INF/lib/Common.jar
    but NOT to a jar in WEB-INF/lib.
    Engineering will look into it sometime to fix it.
    Workaround Suggested:
    As a workaround, you can include the Java/Utility project as part of the EAR and set as dependent J2EE module to the Web project.
    Hope this helps.
    Vimala-

  • Bug in workshop Project Properties for a Java Project !!

    I have a Java project which i am trying to make work with junitee so
    that i can automate my test cases. I have installed junitee as a web
    application named 'junitee' and configured it no problem.
    I have my JUnit test cases in Java Project named 'UnitTest'. What i want
    to happen is that when i build my UnitTest project i want the resulting
    JAR file UnitTest.jar copied into the WEB-INF\lib of the junitee project.
    In order to do this i needed to change the project 'Build' options and
    select the "Copy JAR file from Libraires to Project as" and refer to the
    junitee web app as follows:-
    ../junitee/WEB-INF/lib/UnitTest.jar
    Unfortunately when i do this and select Ok to save my changes workshop
    gives me the following error:-
    The JAR name contains illegal characters. Please correct the name.
    However i have managed to get around this and make it work by manually
    modifying my .work file by hand and not through workshop. This works and
    achieves exactly what i want however it must be a bug in workshop to not
    allow this through the Project Properties window !.
    Else if it is deliberate then i cant see why as you should be able to
    copy a JAR file to any lcoation inside the project if you wish to. I
    hope this gets fixed in SP3.
    Martin

    .. I tried using iPhoto to export a QT file of an image slideshow....
    I would start here to play on the knobs&sliders ..
    what were your settings for export? "QT file" => that is many dozends of options of compression, codecs, resolutions, etc. pp ...
    the consumer apps FCE and iM are meant for TV display only => reduced res + reduced colors, quality reduced due to interlace (due to TV standards) ...-
    a Full Res, h264 encoded qt.mov should display your photos in shining quality ...

  • First Java Project - Document Management and Workflow

    We are about to embark on our first java project around document management and workflow.
    I would be interested to know how others have approached similar projects – Open Source applications or other tools/APIs.
    It would also be good to know of any issues encountered along the way.
    Thanks,
    Steve

    Hi Husein,
    I appreciate your interest in procuring a Document Management/Workflow solution for your AP department...its a very smart move toward streamling that process!
    I sent an email today to Richard Braddock about our solutions. I would be happy to discuss them with you.
    My office phone number is 215-646-8000
    -Martin

  • How to Compile java project on command prompt

    Hello Friends,
    I have created one java project in eclipse. It has 3 packages, 4 external jars and one Link source (meaning it uses other java package that is not in the same project folder)
    It runs perfectly using eclipse.
    Now I want to compile my project and want to run that project.
    I tried using "javac -classpath........." but it didn't work for me. Here is the command I used:
    I am running this command under my main project folder
    javac -classpath ./../../../lib/tools/lib/blur/blur_formats-1.0.jar;./../lib/commons-codec/commons-codec-1.3.jar;./../lib/commons-httpclient/commons-httpclient-3.1.jar;./../lib/commons-logging/commons-logging-1.1.1.jar;./../lib/org.json/org.json.jar;./../lib/smack/3_0_4/smack.jar;./../../../device/branches/viper/Service/blur/common/push/src* ./src/com.proj.hnm.push.StartService.java*
    1) /device/branches/viper/Service/blur/common/push/src - is a different package I am referring (not in my current project folder) - it has java files in com.pushsync package
    2) ./src/com.proj.hnm.push.StartService.java is my main class, com.proj.hnm package also contains another 2 package, and those other packages also have .java files
    Please tell me how do I run my java project?
    Thanks

    Hi
    Since it works fine in Eclipse you should install the [Fat Jar eclipse plugin|http://fjep.sourceforge.net/] which will pack everything thats in your eclipse project into a single jar file. Then you can run: java -jar myProject.jar and it should work.

Maybe you are looking for