VenueControlClass
This class has a menu control method that allows users to add a Venue or ComputerLab object to an array.
Code the attributeas and methods as specified.
1. Code an array that can hold 20 Venue objects. 2. Code the numberOfVenues attribute. 3. Code a no-argument constructor. In this constructor, a) Add 3 Venue objects to the venues array. b) Add 3 ComputerLab objects to the venues array. c) Set numberOfVenues to 6. 3 Applications Development Foundations. 4. Code a method menus() that returns an int value. This value represents the option the user has chosen from the available menu options. Required: a) Define a Scanner variable to read from the keyboard. b) Define an int value, named option. c) Display a menu in the following format: 1: Add room 2: Display rooms 3: Display problem labs 4: Exit d) Read the user’s option from the keyboard into the variable option. e) Return the option read from the keyboard.
ComputerLab
-numberWorkingComputer:int
+<>ComputerLab()
++<>ComputerLab(int,String,String,int)
+setNumberWorkingComputers(int):void
+getNumberWorkingComputer():int
+toString():String
+show():void
+problemVenue():boolean
Code the attributes and methods as per diagram for the ComputerLab class. 1 Remember to call the superclass constructors in the coding of the ComputerLab constructors. 2 Remember to call the superclass toString() in the ComputerLab toString(). 3 Code the show() method. This method is void and displays the details of a ComputerLab object. Again, remember to call the show() of the superclass. Building name: Engineering, Venue number: 1.24, Number of seats: 40, Number of working computers: 35 4, Code the method problemVenue. This method returns a boolean value of true if the numberSeats in the computer lab is more than the numberWorkingComputers, else a boolean value of false is returned.
You have been contracted to design a system for a smart car. The company installed four laser radars on the car’s corners to use as sensors, for the car to be able to avoid collisions at the rear, and the front.
Using a flowchart, show the algorithm for the car collision avoidance system.
Using any recommended programming language of your choice, write a source code for the car collision avoidance system
1. Write a C# Sharp program to print Hello and your name in a separate line.
2. Given a temperature in Celsius degrees, write a method that converts it to Fahrenheit degrees.
3. Given two integers, write a method that swaps them using temporary variable.
4. Given an integer, write a method that checks if it is even.
5. Given a number, write a method that checks if it is positive, negative or zero.
6. Given a year as integer, write a method that checks if year is leap.
Given the following Hamming-encoded codeword received at receiver as "01100001111" having 7 bits of data, 4 bits of error correction code. Determine if the data has been received correctly, and if it is incorrect (assuming that no more than a single bit has changed):
Create an algorithm, pseudocode and flowchart. Discover Company wants to display the salary (net income) of their employees every payday. To compute the salary of an employee, the company requires the following input data such as: rate per hour, number of hours per day, number of days per week, and
number of weeks per month.
Obligatory deduction of each employee which allocated for SSS contribution, Philhealth contribution, Tax contribution, and Pagibig contribution.
For pagibig contribution, the deduction is fixed to P200.00 and rest of each deduction value are coming from the data entry or inputs of the user.
Gross Income = product of rate per hour, number of hours per day, number
of days per week, and number of weeks per month.
Total Deduction = sum of SSS, Philhealth,Tax and Pagibig contribution.
Net Income= difference between Gross Income and Total Deduction.
Note: Computed net income is equivalent salary of an employee per payday.