The document provides instructions to create classes for Person, Customer, Employee, FullTimeEmployee, and PartTimeEmployee with various attributes and methods. It then provides data to create objects of these classes and assign them to arrays, and calls methods to calculate values like profit, salary, tax, and averages. The goal is to model these business entities and their relationships using object-oriented programming principles in Java.
Writea program that defines a template function named add(). Thisfunction tak...licservernoida
Writea program that defines a template function named add(). Thisfunction takes two
arguments, add two variables and then return thesum.
Inmain function, define two variables of type int, two variables oftype float and two objects
callthe add() function three times for these different datatypes.
Note:String is auser
-
When template function will be calledto add two objects of type String then it must
concatenate
twostrings.
Youroutput should look like this:
SampleOutput:
Enter twointeger values to be added
EnterFirst value:12
EnterSecond value:25
Enter twofloat values to be added
EnterFirst value:13.5
EnterSecond value:14.2
Enter twoStrings to be added
EnterFir
st value:Virtual
EnterSecond value:University
Additionof two variables of different data types
Sum ofvalues of type int = 37
Sum ofvalues of type float = 27.7
Sum ofvalues of type String = VirtualUniversity
Writea program that defines a template function named add(). Thisfunction tak...licservernoida
Writea program that defines a template function named add(). Thisfunction takes two
arguments, add two variables and then return thesum.
Inmain function, define two variables of type int, two variables oftype float and two objects
callthe add() function three times for these different datatypes.
Note:String is auser
-
When template function will be calledto add two objects of type String then it must
concatenate
twostrings.
Youroutput should look like this:
SampleOutput:
Enter twointeger values to be added
EnterFirst value:12
EnterSecond value:25
Enter twofloat values to be added
EnterFirst value:13.5
EnterSecond value:14.2
Enter twoStrings to be added
EnterFir
st value:Virtual
EnterSecond value:University
Additionof two variables of different data types
Sum ofvalues of type int = 37
Sum ofvalues of type float = 27.7
Sum ofvalues of type String = VirtualUniversity
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docxgilbertkpeters11344
3/3.docx
STEP 1: Understand the UML Diagram
Analyze and understand the object UML diagram, which models the structure of the program.
· There are no design changes to the Presentation Tier from the previous project and InputUtilities and ApplicationsUtilities classes are used without modification (except for changing the Application Information).
· The default values for each of the attributres have been declared as a constants, which is indicated by the ALL_CAPS in the name, and the attributes are then set using the default values
· Each of the attributes have been specified as private.
· The accessors (get) and mutators (set) are not shown on the class diagram, but it is ASSUMED that each private attribute has a corresponding property that contains the get and set methods.
· The "static" modifier for the numEmployees attribute means that there is only one copy of the variable that is then shared by all the objects of the class.
· There is a second CalculatePay method that overloads the existing CalculatePay method
· While not shown on the class diagram, the property for numEmployees will only have a get method, which means it will be a "read only" method. (A property with only and set method is a "write-only" property).
Image Description
What is depicted is a single column table with 3 rows. In the first row is the large word "Employee".
In the row beneath this is a list of private parameters, indicated with a "minus" symbol before them (but no space after). These are:
-MIN_DEPENDENTS int =0
-MAX_DEPENDENTS int = 10
-MIN_SALARY double = 20000
MAX_SALARY double = 20000
DEFAULT_NAME string = "Not given"
DEFAULT_GENDER char = 'U'
-firstName : String
-lastName : string
-gender : char
-dependents : int
-annualSalary : double
-static numEmployees: int = 0
In the third and final row beneath this is another list of public parameters, indicated with a "plus" symbol before them (but no space after). These are:
+Employee()
+Employee(in first : string, in last : string, in gen : char, in dep : int, in salary : double)
+ToString : string
+CalculateWeeklyPay() : double
+CalcuateWeeklyPay(modifiedSalary double)
Press the ESC key to close the image description and return to lecture.
STEP 2: Create the Project
You will want to use the Week 2 project as the starting point for the lab. To do this, you will want to create a new project by following these steps:
1. Create a new project named "CIS247_WK3_Lab_LASTNAME". An empty project will then be created.
2. Delete the default Program.cs file that is created.
3. Click on Project->Add Existing Item…. Select the .cs files containing the InputUtilities, ApplicationUtilities, Employee, and Program classes from your project folder from last week's lab.
4. The namespaces for the classes should all be "Employee", but you should verify that the namespaces for all the classes are the same.
5. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name,.
Exercise
1
[5
points]:
Create the following classes shown in the UML diagram. Then, create PointTest.java class with main method to test all functionality of these classes.
Exercise
2
[10
points]:
The following figure shows a UML diagram in which the class Student is inherited from the class
Person
a. Implement a Person class. The person constructor takes two strings: a first name and a last name. The constructor initializes the email address to the first letter of the first name followed by first five letters of the last name followed by @tru.ca. If the last name has fewer than five letters, the e-mail address will be the first letter of the first name followed by the entire last name followed by a @tru.ca. Examples:
Name
Email Address
Jane Smith
[email protected]
Musfiq Rahman
[email protected]
John Morris
[email protected]
Mary Key
[email protected]
b. Override Object’s toString method for the Person class. The toString method should return the present state of the object.
c. Now, create a Student class that is a subclass of Person and implements Comparable interface.
d. The Student constructor will be called with two String parameters, the first name and last name of the student. When the student is constructed, the inherited fields lastName, firstName, and email will be properly initialized, the student’s gpa and number of credit will be set to 0. The variable lastIdAssigend will be properly incremented each time a Student object is constructed and the studentId will be set to the next available ID number as tracked by the class variable lastIdAssigend.
e. Override the object’s toString method for the Student class. The toString method should return the present state of the object.
Note that it should use the toString() method from its superclass.
f. The addCourse() method should update the credits completed, calculate, and update the gpa value.
Use the following values for grade:
Example GPA calculation:
GRADE CREDIT CALCULATION
(A) 4.0 x 4 = 16.00
(B) 3.0 x 4 = 12.00
(B) 3.0 x 4 = 12.00
(A) 4.0 x 1 = 4.00
(C) 2.0 x 3 = 6.00
GPA = 50.00 / 16 = 3.125; the getGPA() method should return this value.
g. Students are compared to each other by comparing GPAs. Override the compareTo() method for the student class. Note that to override the compareTo() method, the Student class must implement Comparable interface.
Now, test your code with the supplied client code (StudentClient.java). Note: You should not modify this client code. We will use the same client code to test your classes.
Exercise
3
[10
points]:
In this exercise, you need to implement a class that encapsulate a Grid. A grid is a useful concept in creating board-game applications. Later we will use this class to create a board game. A grid is a two-dimensional matrix (see example below) with the same number of rows and columns. You can create a grid o ...
Assignment Instructions 2_7aExplain the interrelationships bet.docxssuser562afc1
Assignment Instructions 2_7a
Explain the interrelationships between planning, organizing, directing, controlling, and leading.
This is a one-page assignment. Should contain academic references and be thoroughly researched.
Please include an Abstract, Details Heading/Subheading and Conclusion. Also,all include (cites), attach the websites/details/links with the references. I have been asked for them by my professor
Let me know if you any questions.
Please let me know if you any questions.
You will want to use the Week 3 project as the starting point for the lab. To do this, you will want to create a new project by following these steps:
1. Create a new project named "CIS247_WK4_Lab_LASTNAME". An empty project will then be created.
2. Delete the default Program.cs file that is created.
3. Now that we are beginning to add more classes to our projects the
Solution
Explorer can become difficult to organize so you will create folders to hold the Presentation Tier and Logic Tier Files in order to organize the project. One thing to remember, even though we only have a few files in our project, a professional program will have 100's if not 1000's of files in a project so you will want to get practice in organizing your project files in a logical folder heirarchy and we will use the Tiered Architecture structure shown in the UML Class diagram for the folder structure. You will find that creating folders within MS Visual Studio is very similiar to creating folders in Windows Explorer. Follow these directions to create the folders:
1. Select the project and then right click
2. Select Add
3. Select New Folder
4. Enter the name of the folder
4. Add the following three folders to your project (1) Presentation Tier, (2) Logic Tier, and (3) Utilities.
5. You are going to add the files from the previous week lab to the project just as you did before, but now you add the existing files to the corresponding folder
6. Select the PresentationTier folder, right click and select Add then Existing Item, navigate to your previous week's project and select the InputUtitilies.cs and Program.cs files and click add. These two files will then be added to the Presentation. [Hint: you can also drag and drop the files directly from Windows Explorer directly into the corresponding folder in your project!]
7. Add the previous week's Employee.cs file to the Logic Tier folder. You will also add the new Benefits class to this folder.
8. Add the ApplicationUtilities.cs file to the Utilities folder.
9. Your solution explorer should look similiar to the following (note: you can rename any folder by selecting the folder, right click, and then Rename just like you do in Windows).
10. The namespaces for the classes should all be "Employee", but you should verify that the namespaces for all the classes are the same.
11. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description.
12 ...
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docxgilbertkpeters11344
3/3.docx
STEP 1: Understand the UML Diagram
Analyze and understand the object UML diagram, which models the structure of the program.
· There are no design changes to the Presentation Tier from the previous project and InputUtilities and ApplicationsUtilities classes are used without modification (except for changing the Application Information).
· The default values for each of the attributres have been declared as a constants, which is indicated by the ALL_CAPS in the name, and the attributes are then set using the default values
· Each of the attributes have been specified as private.
· The accessors (get) and mutators (set) are not shown on the class diagram, but it is ASSUMED that each private attribute has a corresponding property that contains the get and set methods.
· The "static" modifier for the numEmployees attribute means that there is only one copy of the variable that is then shared by all the objects of the class.
· There is a second CalculatePay method that overloads the existing CalculatePay method
· While not shown on the class diagram, the property for numEmployees will only have a get method, which means it will be a "read only" method. (A property with only and set method is a "write-only" property).
Image Description
What is depicted is a single column table with 3 rows. In the first row is the large word "Employee".
In the row beneath this is a list of private parameters, indicated with a "minus" symbol before them (but no space after). These are:
-MIN_DEPENDENTS int =0
-MAX_DEPENDENTS int = 10
-MIN_SALARY double = 20000
MAX_SALARY double = 20000
DEFAULT_NAME string = "Not given"
DEFAULT_GENDER char = 'U'
-firstName : String
-lastName : string
-gender : char
-dependents : int
-annualSalary : double
-static numEmployees: int = 0
In the third and final row beneath this is another list of public parameters, indicated with a "plus" symbol before them (but no space after). These are:
+Employee()
+Employee(in first : string, in last : string, in gen : char, in dep : int, in salary : double)
+ToString : string
+CalculateWeeklyPay() : double
+CalcuateWeeklyPay(modifiedSalary double)
Press the ESC key to close the image description and return to lecture.
STEP 2: Create the Project
You will want to use the Week 2 project as the starting point for the lab. To do this, you will want to create a new project by following these steps:
1. Create a new project named "CIS247_WK3_Lab_LASTNAME". An empty project will then be created.
2. Delete the default Program.cs file that is created.
3. Click on Project->Add Existing Item…. Select the .cs files containing the InputUtilities, ApplicationUtilities, Employee, and Program classes from your project folder from last week's lab.
4. The namespaces for the classes should all be "Employee", but you should verify that the namespaces for all the classes are the same.
5. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name,.
Exercise
1
[5
points]:
Create the following classes shown in the UML diagram. Then, create PointTest.java class with main method to test all functionality of these classes.
Exercise
2
[10
points]:
The following figure shows a UML diagram in which the class Student is inherited from the class
Person
a. Implement a Person class. The person constructor takes two strings: a first name and a last name. The constructor initializes the email address to the first letter of the first name followed by first five letters of the last name followed by @tru.ca. If the last name has fewer than five letters, the e-mail address will be the first letter of the first name followed by the entire last name followed by a @tru.ca. Examples:
Name
Email Address
Jane Smith
[email protected]
Musfiq Rahman
[email protected]
John Morris
[email protected]
Mary Key
[email protected]
b. Override Object’s toString method for the Person class. The toString method should return the present state of the object.
c. Now, create a Student class that is a subclass of Person and implements Comparable interface.
d. The Student constructor will be called with two String parameters, the first name and last name of the student. When the student is constructed, the inherited fields lastName, firstName, and email will be properly initialized, the student’s gpa and number of credit will be set to 0. The variable lastIdAssigend will be properly incremented each time a Student object is constructed and the studentId will be set to the next available ID number as tracked by the class variable lastIdAssigend.
e. Override the object’s toString method for the Student class. The toString method should return the present state of the object.
Note that it should use the toString() method from its superclass.
f. The addCourse() method should update the credits completed, calculate, and update the gpa value.
Use the following values for grade:
Example GPA calculation:
GRADE CREDIT CALCULATION
(A) 4.0 x 4 = 16.00
(B) 3.0 x 4 = 12.00
(B) 3.0 x 4 = 12.00
(A) 4.0 x 1 = 4.00
(C) 2.0 x 3 = 6.00
GPA = 50.00 / 16 = 3.125; the getGPA() method should return this value.
g. Students are compared to each other by comparing GPAs. Override the compareTo() method for the student class. Note that to override the compareTo() method, the Student class must implement Comparable interface.
Now, test your code with the supplied client code (StudentClient.java). Note: You should not modify this client code. We will use the same client code to test your classes.
Exercise
3
[10
points]:
In this exercise, you need to implement a class that encapsulate a Grid. A grid is a useful concept in creating board-game applications. Later we will use this class to create a board game. A grid is a two-dimensional matrix (see example below) with the same number of rows and columns. You can create a grid o ...
Assignment Instructions 2_7aExplain the interrelationships bet.docxssuser562afc1
Assignment Instructions 2_7a
Explain the interrelationships between planning, organizing, directing, controlling, and leading.
This is a one-page assignment. Should contain academic references and be thoroughly researched.
Please include an Abstract, Details Heading/Subheading and Conclusion. Also,all include (cites), attach the websites/details/links with the references. I have been asked for them by my professor
Let me know if you any questions.
Please let me know if you any questions.
You will want to use the Week 3 project as the starting point for the lab. To do this, you will want to create a new project by following these steps:
1. Create a new project named "CIS247_WK4_Lab_LASTNAME". An empty project will then be created.
2. Delete the default Program.cs file that is created.
3. Now that we are beginning to add more classes to our projects the
Solution
Explorer can become difficult to organize so you will create folders to hold the Presentation Tier and Logic Tier Files in order to organize the project. One thing to remember, even though we only have a few files in our project, a professional program will have 100's if not 1000's of files in a project so you will want to get practice in organizing your project files in a logical folder heirarchy and we will use the Tiered Architecture structure shown in the UML Class diagram for the folder structure. You will find that creating folders within MS Visual Studio is very similiar to creating folders in Windows Explorer. Follow these directions to create the folders:
1. Select the project and then right click
2. Select Add
3. Select New Folder
4. Enter the name of the folder
4. Add the following three folders to your project (1) Presentation Tier, (2) Logic Tier, and (3) Utilities.
5. You are going to add the files from the previous week lab to the project just as you did before, but now you add the existing files to the corresponding folder
6. Select the PresentationTier folder, right click and select Add then Existing Item, navigate to your previous week's project and select the InputUtitilies.cs and Program.cs files and click add. These two files will then be added to the Presentation. [Hint: you can also drag and drop the files directly from Windows Explorer directly into the corresponding folder in your project!]
7. Add the previous week's Employee.cs file to the Logic Tier folder. You will also add the new Benefits class to this folder.
8. Add the ApplicationUtilities.cs file to the Utilities folder.
9. Your solution explorer should look similiar to the following (note: you can rename any folder by selecting the folder, right click, and then Rename just like you do in Windows).
10. The namespaces for the classes should all be "Employee", but you should verify that the namespaces for all the classes are the same.
11. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description.
12 ...
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
1. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
1 of 6
Object Oriented Programming Assignment 4
Author: Kasun Ranga Wijeweera
Email: krw19870829@gmail.com
Date: 2019 October 25
1) Suppose you have to develop an information system for a company. A part of the class
diagram is given below.
a) Create the class Person that includes attributes: id, name, age, and gender with data
types: “int”, “String”, “int”, and “char” respectively.
b) Include a constructor to the class Person with parameters: id, name, age, and gender.
c) Include getters and setters for each attribute of the class Person.
d) Include a method called display to the class Person to display the values of attributes of
the class.
e) Include a method called getAverageAge to the class Person to get the average age of a
person.
f) Create the class Customer that includes attributes: level, amount1, amount2, and profit
with data types: “int”, “double”, “double”, and “double” respectively.
g) Include a constructor to the class Customer with parameters: id, name, age, gender, and
level.
h) Include getters and setters for each attribute of the class Customer.
i) Include a method called display to the class Customer to display the values of attributes
of the class.
Person
Customer Employee
FullTimeEmployee PartTimeEmployee
2. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
2 of 6
j) Consider the class Customer. The value of the attribute profit is computed by
subtracting the value of the attribute amount1 from the value of the attribute amount2.
Include a method called calculateProfit to the class to calculate the value of the attribute
profit.
k) Include a method called buyItems to the class Customer with parameters: price1,
price2, and n. The new value of the attribute amount1 is computed by multiplying the
value of the attribute price1 with the value of the attribute n and adding the value of the
attribute amount1. The value of the attribute amount2 is computed by multiplying the
value of the attribute price2 with the value of the attribute n and adding the value of the
attribute amount2. Include these computations to the body of the method.
l) Include a method called reduceProfit to the class Customer that computes the value of
reduction. The value of reduction is computed by multiplying the value of attribute profit
from the value of t. The value of t is based on the value of the attribute level as given in
the table below. Furthermore, the value of reduction should be subtracted from the value
of attribute profit.
level t
1 0.03
2 0.05
3 0.08
4 0.12
m) Create the driver class called Test that includes the “main” method.
n) Include a class method called display to the class Test that takes an array of references of
type Person as the parameter. The method should display the values of attributes of the
objects referred through the parameter.
o) Create an array that holds five Customer objects. Assign the objects given in the table
below to each array element using the constructor.
id name age gender level
3521 Kasun 27 M 3
4863 Nimal 23 M 2
5791 Nayana 28 F 4
2456 Chathura 32 M 1
7593 Waruni 18 F 2
p) Use the method display in the class Test to display the values of attributes of the
Customer objects.
q) Increment the value of the attribute level of the fourth Customer object by 1.
3. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
3 of 6
r) Change the value of the attribute gender of the third Customer object to „M‟.
s) Use the method display in the class Customer to display the values of attributes of
second and third Customer objects.
t) Use the method getAverageAge in the class Person to compute the average age of the
Customer objects.
u) The table given below shows the set of items bought by each of the customer. Use the
method buyItems in the class Customer to add the given items.
id price1 price2 n
3521 54 57 8
32 39 5
75 76 7
4863 45 48 9
78 81 12
12 14 17
24 27 4
5791 92 96 8
125 130 10
2456 82 89 7
138 155 6
52 60 2
66 75 11
105 120 21
7593 99 110 2
v) Use the method calculateProfit in the class Customer to compute the value of the
attribute profit of each Customer object.
w) Display the value of the attribute profit of each Customer object.
x) Compute the new value of the attribute profit of each Customer object using the method
reduceProfit in the class Customer.
y) Create the class Employee that includes attributes: designation, mobile, salary and tax
with data types: “String”, “String”, “double” and “double” respectively.
z) Include a constructor to the class Employee with parameters: id, name, age, gender,
designation, and mobile.
aa) Include getters and setters for each attribute of the class Employee.
4. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
4 of 6
bb) Include a method called display to the class Employee to display the values of attributes
of the class.
cc) Include a method called getAverageSalary to the class Employee to get the average
salary of an employee.
dd) Include a method called computeTax to the class Employee with the parameter taxRate
to compute the value of the attribute tax. The value of the attribute tax is computed by
multiplying the value of the attribute salary with the value of the attribute taxRate.
ee) Include a method called getNetSalary to the class Employee. The method should return
the value that is computed by subtracting the value of the attribute tax from the value of
the attribute salary.
ff) Create the class FullTimeEmployee that includes attributes: fund and fundRate with
data types: “double” and “double” respectively.
gg) Include a constructor to the class FullTimeEmployee with parameters: id, name, age,
gender, designation, mobile, and fundRate. The value of the attribute fund should be
initially zero for any full-time employee.
hh) Include getters and setters for each attribute of the class FullTimeEmployee.
ii) Include a method called display to the class FullTimeEmployee to display the values of
attributes of the class.
jj) Include a method called addToFund to the class FullTimeEmployee to add an amount
to the value of the attribute fund. The amount to be added is computed by multiplying the
value of the attribute salary with the value of the attribute fundRate. The value of the
attribute fund should be subtracted from the value of the attribute salary.
kk) Create an array that holds seven FullTimeEmployee objects. Assign the objects given in
the table below to each array element using the constructor.
id name age gender designation mobile fundRate
68494 Nuwan 52 M Manager 0516859465 3%
98451 Charaka 29 M Assistant Manager 0919576348 2%
79563 Wathsala 34 F Clerk 0668567956 1%
36864 Chathurika 35 F Clerk 0219762354 2%
48952 Sandun 27 M Laborer 0319548261 1%
65825 Janith 21 M Laborer 0119652352 0.5%
56286 Chamari 38 F Clerk 0512648927 2%
5. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
5 of 6
ll) Use the method display in the class Test to display the values of attributes of the
FullTimeEmployee objects.
mm) Set the value of the attribute salary of each FullTimeEmployee object according
to the table given below.
id salary
68494 65000
98451 60000
79563 35000
36864 30000
48952 20000
65825 25000
56286 40000
nn) Invoke the method addToFund in the class FullTimeEmployee for each
FullTimeEmployee object. The value of the parameter fundRate is computed according
to the table given below.
id fundRate
68494 4%
98451 3%
79563 2%
36864 1%
48952 2%
65825 2%
56286 1%
oo) Create the class PartTimeEmployee that includes attributes: hours and rate with data
types: “double” and “double” respectively.
pp) Include a constructor to the class PartTimeEmployee with parameters: id, name, age,
gender, designation, mobile, and rate.
qq) Include getters and setters for each attribute of the class PartTimeEmployee.
rr) Include a method called display to the class PartTimeEmployee to display the values of
attributes of the class.
ss) Include a method called computeSalary to the class PartTimeEmployee to compute the
value of the attribute salary. The value of the attribute salary is computed by multiplying
the value of the attribute hours with the value of the attribute rate.
6. Object Oriented Programming in Java [Lesson 1; Lesson 2; Lesson 3; Lesson 4]
6 of 6
tt) Create an array that holds two PartTimeEmployee objects. Assign the objects given in
the table below to each array element using the constructor.
id name age gender designation mobile rate
68542 Saman 56 M Temporary Clerk 0215698542 300
79546 Nimal 57 M Temporary Laborer 081684952 150
uu) Set the value of the attribute hours of each PartTimeEmployee object according to the
table given below.
id hours
68542 160
79546 172
vv) Compute the value of the attribute salary of each PartTimeEmployee object by
invoking the method computeSalary in the class PartTimeEmployee.
ww) Create an array of type Employee that has nine elements. Assign the seven
FullTimeEmployee objects and the two PartTimeEmployee objects you have created to
each array element.
xx) Invoke the method computeTax in the class Employee for each Employee object to
compute the value of the attribute tax. Suppose that the value of the parameter taxRate is
0.03.
yy) Update the value of the attribute salary of each Employee object using the method
getNetSalary of the class Employee.
zz) Invoke the method getAverageSalary in the class Employee to compute the average
salary of each Employee object.