Suppose you are employed by a advertisement agency to design a system to send advertisements in different languages and to different modes such as sms, email, in-mail, cable-tv, etc. (more can be added later or).
The process of sending an advertisement is always the same irrespective of the language or the mode of the advertisement. The process is as follows:
1. The text of the advertisement is received as text
2. The text is then translated into a desired language.
3. The translation depends upon the mode of advertisement
4. The translated text is then proof-read for consistency
5. And then the text is advertised on the required mode
Your task is the following:
• Identify the design pattern that can be used over here
• Justify your choice
• Make a class diagram (using UML Notation)
• Implement the classes in JAVA
• Test your implementation
Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee.
(The Person, Student, Employee, Faculty, and Staff classes)
A person has a name, address, phone number, and email address. A student has a class status (freshman, sophomore, junior, or senior). Define the status as a constant. An employee has an office, salary, and date hired. A faculty member has office hours and a rank. A staff member has a title. Override the toString method in each class to display the class name and the person’s name.
Write a test program that creates a Person, Student, Employee, Faculty, and Staff, and invokes their toString() methods.
Write a java Program considering the following scenario.
•Mobile is an Object that contains basic functionalities including Calling & Receiving a call & Messaging. The Mobile has certain features including Processor, internal memory, single or dual SIM, weight. The IMEI number is only used for identifying the device.
•There can be different mobiles like Samsung, iPhone or Nokia which have their own features along with the basic functionality of a mobile phone.
•In case of Samsung, the Android version, Camera Specs and playing FM Radio, capturing photos.
•iPhone may have an ios version, Music Player, Camera.
•Any of these mobile phones can be used to make a call or send a text message.
Write a simple java program that adds two integers input by user. The program should terminate if any operand is nonnumeric. Before program exit, a message should be displayed that “Input is not valid!”.
Hint: You can use
–NumberFormatException
–InputMismatchException
--ClasscastExcception
https://www.chegg.com/homework-help/questions-and-answers/question-2-marks-20-organisation-work-asked-create-interactive-application-assist-allocati-q74111994
Create a class named MusicalComposition that contains fields for title, composer, and year
written. Include a constructor that requires all three values and an appropriate display function.
The child class NationalAnthem contains an additional field that holds the name of the
anthem’s nation. The child class constructor requires a value for this additional field. The child
class also contains a display function. Write a main() function in class MusicDemo that
instantiates objects of each class and demonstrates that the functions work correctly.
Create an Investment class that contains fields to hold the initial value of an investment, the
current value, the profit (calculated as the difference between current value and initial value),
and the percent profit (the profit divided by the initial value). Include a constructor that requires
initial and current values and a display function. Create a House class that includes fields for
street address and square feet, a constructor that requires values for both fields, and a display
function. Create a HouseThatIsAnInvestment class that inherits from Investment and House. It
includes a constructor and a display function that calls the display functions of the parents
java inheritance programs of example music composition
Create a class named MusicalComposition that contains fields for title, composer, and year written. Include a constructor that requires all three values and an appropriate display function. The child class NationalAnthem contains an additional field that holds the name of the anthem’s nation. The child class constructor requires a value for this additional field. The child class also contains a display function. Write a main() function in class MusicDemo that instantiates objects of each class and demonstrates that the functions work correctly.
Rohan was asked by his teacher to develop a program which takes in a dynamic user input and prints all the prime numbers till that number and then prints all the composite numbers till that number. Help him out by developing the program to do so