Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The simple assignment of checking out whether lists are identical can be generalised to permit a positive quantity of mistakes. We keep in mind three

The simple assignment of checking out whether lists are identical can be generalised to permit a positive quantity of mistakes. We keep in mind three styles of errors:  detail mismatch, as in [1,2,3] versus [1,9,3] or [1,2,3] versus [0,2,3]  left deletion, as in [1,3] as opposed to [1,2,3] or [1,2] versus [1,2,3]  proper deletion, as in [1,2,g3] versus [1,3] or [1,2,3] as opposed to [1,2] Write a function genEquals n xs ys that returns proper if the two lists xs and ys are equal with no greater than n mistakes, and in any other case fake. You might also expect that n is a non-poor integer. [8 marks] All ML code should be explained definitely and must be free of pointless complexity. 3 (TURN OVER) CST.2014.1.4 SECTION B 3 Object-Oriented Programming (a) (i) Explain the purpose of get right of entry to modifiers in OOP languages. [2 marks] (ii) Copy and complete the desck underneath to reveal the get entry to regulations for the four get admission to modifiers in Java. [2 marks] Access Modifier Defining elegance Class in equal package Subclass in one of a kind bundle Non-subclass in distinctive package (b) A Java game dressmaker desires to store all the sport possibilities (e.G., player name, screen size, music quantity, etc.) Write a polymorphic function rl_encode to carry out this encoding. What is the type of rl_encode? [6 marks] (c) The simple assignment of checking out whether lists are identical can be generalised to permit a positive quantity of mistakes. We keep in mind three styles of errors:  detail mismatch, as in [1,2,3] versus [1,9,3] or [1,2,3] versus [0,2,3]  left deletion, as in [1,3] as opposed to [1,2,3] or [1,2] versus [1,2,3]  proper deletion, as in [1,2,g3] versus [1,3] or [1,2,3] as opposed to [1,2] Write a function genEquals n xs ys that returns proper if the two lists xs and ys are equal with no greater than n mistakes, and in any other case fake. You might also expect that n is a non-poor integer. [8 marks] All ML code should be explained definitely and must be free of pointless complexity. 3 (TURN OVER) CST.2014.1.4 SECTION B 3 Object-Oriented Programming (a) (i) Explain the purpose of get right of entry to modifiers in OOP languages. [2 marks] (ii) Copy and complete the desk underneath to reveal the get entry to regulations for the four get admission to modifiers in Java. [2 marks] Access Modifier Defining elegance Class in equal package Subclass in one of a kind bundle Non-subclass in distinctive package (b) A Java game dressmaker desires to store all the sport possibilities (e.G., player name, screen size, music quantity, etc.) inside a custom Preference class. (i) Assuming every choice is saved as a completely unique String key mapping to a String cost, give a easy implementation of Preference that allows for efficaciously placing or updating preferences and retrieving formerly set ones. Your implementation should define an exception that is thrown whilst a preference secret is asked however not gift. [5 marks] (ii) It is critical that only one Preference item exists in a walking sport. Show how to practice get right of entry to modifiers and the Singleton design pattern to make sure this. Your implementation ought to lazily instantiate the item. Is it necessary to make your elegance very last or Cloneable? Explain your solution. [6 marks] (c) The clothier additionally implements other Singleton lessons in the sport and proposes to create a SingletonBase base magnificence from which all such instructions would inherit the singleton behaviour. By supplying example Java code, explain why this isn't possible. [5 marks] four CST.2014.1.Five 4 Object-Oriented Programming A Lecturer wishes to create a application that lists his college students looked after by the range of realistic assignments they have completed. The listinghave to be finest variety of assignments first, sub-taken care of by means of call in lexicographical order (A to Z). A magnificence StudentInfo shops the call and range of assignments finished for a student. Amongst different techniques, it consists of a void setCompleted(int n) approach that lets in changes to the variety of completed assignments. (a) Provide a definition of StudentInfo with an equals() approach and a naturalordering that fits the given requirement. [RKinside a custom Preference class. (i) Assuming every choice is saved as a completely unique String key mapping to a String cost, give a easy implementation of Preference that allows for efficaciously placing or updating preferences and retrieving formerly set ones. Your implementation should define an exception that is thrown whilst a preference secret is asked however not gift. [5 marks] (ii) It is critical that only one Preference item exists in a walking sport. Show how to practice get right of entry to modifiers and the Singleton design pattern to make sure this. Your implementation ought to lazily instantiate the item. Is it necessary to make your elegance very last or Cloneable? Explain your solution. [6 marks] (c) The clothier additionally implements other Singleton lessons in the sport and proposes to create a SingletonBase base magnificence from which all such instructions would inherit the singleton behaviour. By supplying example Java code, explain why this isn't possible. [5 marks] four CST.2014.1.Five 4 Object-Oriented Programming A Lecturer wishes to create a application that lists his college students looked after by the range of realistic assignments they have completed. The listinghave to be finest variety of assignments first, sub-taken care of by means of call in lexicographical order (A to Z). A magnificence StudentInfo shops the call and range of assignments finished for a student. Amongst different techniques, it consists of a void setCompleted(int n) approach that lets in changes to the variety of completed assignments. (a) Provide a definition of StudentInfo with an equals() approach and a naturalordering that fits the given requirement. [RKYou and your team are required to study andd consider the following requirements for the design

of a computer network solution for Organization XYZ which fulfill not only the general Internet

usage but also the following specific expectations:

1. Organization XYZ will subscribed to only one (1) Internet gateway from the ISP with downlink

of 500Mbps and Uplink of 100Mbps. All 3 offices will share this gateway for Internet related

purposes.

2. The numbers of employees in each office are as follow:

a. Office A - 20 stationary employees, 4 mobile employees

b. Office B - 15 employees, 3 mobile employees

c. Office C - 16 employees

13. Printers in all offices are networked and shared to all users:

a. Office A - 2 printers

b. Office B - 1 printer

c. Office C - 1 printer

4. Office A and Office B's meeting rooms shall provide restricted WiFi access to guests coming

for meeting.

5. General employees are not allowed to access Facebook during office hours except few that

are authorized to do so.

6. All company documents and training video are to be stored in a local file server within

Organization XYZ, employees shall have fast access to these files.

7. Organization XYZ is hosting their own company website at their own premise, where the web

server is publishing general company profile information to the public.

D. Tasks:

Your team is required to

1. Suggest and design a practical and cost-effective network solution for Organization XYZ as a

whole, by providing a complete network diagram.

a. All network components in all 3 offices shall be labelled accordingly including the

location of the Internet gateway.

b. Indicate essential technical specifications (type of switches: 8-port Fast Ethernet UTP

Switch, type of cables: UTP CAT5E, etc.) of all network components and transmission

media used. Provide justifications to the essential technical specifications, relate them

to practicality and cost-effectiveness.

c. Indicate the suitable network technology (type of wired or wireless links) to be used

for interbuilding connections in order to link all 3 offices together. Justify your choice

of technology in term of practicality and cost-effectiveness.

2. Suggest and explain where should the file server and web server be located and how to ensure

optimum performance of both servers in serving their functions. Indicate also the location of

both servers in the same network diagram.

3. Suggest and explain how should the overall network be protected against external intruders

or hackers. Protection against unauthorize network access, illegal file server access and DOS

(Denial of Service) attack to the web server.

4. Suggest and explain how the control of Facebook access during office hours, shall be

implemented.

A. Objectives:

The objective of this group project is to provide a platform for students to experience

how to apply the knowledge learned from the communication and computer networks course into

designing a practical real-world network implementation for an office environment with specific

usage requirements.

B. Scenario:

Organization XYZ has three (3) offices located in three different buildings within the same

commercial area, as labelled in A, B and C in Figure 1 below, and each office's layout is shown in

sectionI: Layouts of Offices


Figure 1: Locations of the 3 offices of Organization XYZ

C. Design Requirements:

You and your team are required to study and consider the following requirements for the design

of a computer network solution for Organization XYZ which fulfill not only the general Internet

usage but also the following specific expectations:

1. Organization XYZ will subscribed to only one (1) Internet gateway from the ISP with downlink

of 500Mbps and Uplink of 100Mbps. All 3 offices will share this gateway for Internet related

purposes.

2. The numbers of employees in each office are as follow:

a. Office A - 20 stationary employees, 4 mobile employees

b. Office B - 15 employees, 3 mobile employees

c. Office C - 16 employees

13. Printers in all offices are networked and shared to all users:

a. Office A - 2 printers

b. Office B - 1 printer

c. Office C - 1 printer

4. Office A and Office B's meeting rooms shall provide restricted WiFi access to guests coming

for meeting.

5. General employees are not allowed to access Facebook during office hours except few that

are authorized to do so.

6. All company documents and training video are to be stored in a local file server within

Organization XYZ, employees shall have fast access to these files.

7. Organization XYZ is hosting their own company website at their own premise, where the web

server is publishing general company profile information to the public.

D. Tasks:

Your team is required to

1. Suggest and design a practical and cost-effective network solution for Organization XYZ as a

whole, by providing a complete network diagram.

a. All network components in all 3 offices shall be labelled accordingly including the

location of the Internet gateway.

b. Indicate essential technical specifications (type of switches: 8-port Fast Ethernet UTP

Switch, type of cables: UTP CAT5E, etc.) of all network components and transmission

media used. Provide justifications to the essential technical specifications, relate them

to practicality and cost-effectiveness.

c. Indicate the suitable network technology (type of wired or wireless links) to be used

for interbuilding connections in order to link all 3 offices together. Justify your choice

of technology in term of practicality and cost-effectiveness.

2. Suggest and explain where should the file server and web server be located and how to ensure

optimum performance of both servers in serving their functions. Indicate also the location of

both servers in the same network diagram.

3. Suggest and explain how should the overall network be protected against external intruders

or hackers. Protection against unauthorize network access, illegal file server access and DOS

(Denial of Service) attack to the web server.

4. Suggest and explain how the control of Facebook access during office hours, shall be

implemented.

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

Introduction To Leadership Concepts And Practice

Authors: Peter G Northouse

5th Edition

1544351593, 978-1544351599

More Books

Students also viewed these Computer Network questions

Question

describe the two basic forms of functional social support;

Answered: 1 week ago