Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

General Instructions: 1. Create a project in IntelliJ IDEA with the naming convention as follows: Class code-ID number-Last name, First name (e.g. 9300-2200000-Dela Cruz,

imageimage

General Instructions: 1. Create a project in IntelliJ IDEA with the naming convention as follows: Class code-ID number-Last name, First name (e.g. 9300-2200000-Dela Cruz, Juan) 2. For your RMI and ORB port numbers, you are to use 1099 (RMI) and 1100 (ORB). Problem on Java RMI Instructions: Within the project, create a package named midexam1. The Java RMI classes of the exam will be placed in this package. The main classes (containing main method) will follow the convention: MidExam1 Problem Description: Create the Java RMI servant and server programs ONLY that implements the remote interface below. You may also opt to combine both the servant and server programs within a single class (server) only. public interface QuizTwo extends Remote { } public String dotw(int m, int d, int y) throws RemoteException; public int noOfDays (int m, int d) throws RemoteException; Details of the methods to be implemented: dotw - This method returns the day of the week (as in monday, tuesday, etc.) of the given date parameter (m: month, d: day, y: year). If the date is not valid (ex. February 31, 2021), the method returns the string "invalid". noOfDays - This method returns the number of days from January 1 to the specified date parameter (m: month, d: day) of this year. If the date is not valid (ex. February 31), it returns 0. Problem on CORBA Instructions: Create a package named midexam2 inside your project. The CORBA related files and classes will be placed inside this package. Inside midexam2 package, create the other two sub-packages: server and client. All classes related to the server/servant will have to be placed inside server package and all client-related classes will have to be placed inside client package. The client program must test the methods as reflected in the CORBA IDL file. Register the CORBA object in the orb with the string "convert". Also, include the file midexam2.idl in the midexam2 package. Content of the file is as follows: module converter { interface Conversion { double convertToInch(in double cm); double convertToCm(in double inch); }; }; Remember that an inch is equivalent to 2.54 centimeters! Notes: After creating your classes, you have to comment out (or delete) the package statements that the IDE automatically inserts in your codes. Alternative ways of accessing the console/command prompt from the project explorer of IntelliJ IDEA. First, right click the target location (package) in the project explorer tab of the IDE. Select Open In and you will have three options from there (Explorer, Directory Path, and Terminal) as shown below: Project ServerSample C:\Users\Lenovo\Deskt idea out *Favorites I res > concurrency corbasar New > clien X Cut Ctrl+X > lidl Ctrl+C > Dilserve > Dobjectfil Copy Copy Path... Dill objectsti >portche >micallb > misam > bil sample1 > threadp ServerSamp > External Librari Paste Find Usages Find in Files.. Replace in Files... Analyze Befactor Ctrl+V Alt+F7 Ctrl+Shift+F Ctrl+Shift+R Add to Favorites Scratches and Reformat Code Ctrl+Alt+L Optimize Imports Ctrl+Alt+0 Delete... Delete Build Module 'ServerSample Rebuild 'corbasample Ctrl+Shift+F9 Open In Explorer Local History Reload from Disk Directory Path Terminal Ctrl+Alt+F12 If you choose Explorer, the file browser window appears (Windows Explorer) and you can simply type "cmd" in the address bar of the window to activate the console (command prompt). If you choose the Terminal option, you will have the console to be shown at the bottom part of the IDE. See figure below: >sample1 > threadpool ServerSample.iml Terminal: Local x Local (2)x+ Microsoft Windows [Version 18.8.19841.867] (c) 2828 Microsoft Corporation. All rights reserved. C:\Users\Lenovo\Desktop\IT 222\Server Sample\src\corbasample> Problems Profiler Terminal TODO Build "Kotlin' plugin update available // Update // Plugin Settings... // Ignore this update (12/03/2021 1:34 PM)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Java RMI Implementation midexam1 package 1 QuizTwo Interface Create a file named QuizTwojava inside the midexam1 package with the following code Java public interface QuizTwo extends Remote String dot... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions