Write nested for c++ loops to produce the following output.
×××× / / / / / / / / ××××
××× / / / / / / \ \ ×××
×× / / / / \ \ \ \ ××
× / / \ \ \ \ \ \ ×
\ \ \ \ \ \ \ \
In the Virtual Circuit (VC) Subnet (refer the course material “Session 20 Network Layer Functionalities” in Moodle) every circuit will have a VC ID and the routing table includes the VC IDs to manage the circuits. But, the problem with VC ID is it is local to the system; VC IDs are assigned by the host system itself without the knowledge of VC IDs assigned by the other hosts. Because of which there will be a clash of VC IDs at the router. Understanding the ambiguity, the router then changes one of the VC IDs to a unique ID at router level and proceeds with data transfer (refer Slide No. 12 of the course material). Over and above the data transfer, this is the additional responsibility for a router which creates hiccups in the data communication. Question: Design a network system where VC IDs will be assigned uniquely which avoids VC ID collision at routers. Since such a system avoids the VC ID collision at the router, it should definitely save router's time and should improve performance of router.
There is only one kind of manager in the EMPMULT program in this chapter. Any serious
company has executives as well as managers. From the manager class derive a class
called executive. (We’ll assume an executive is a high-end kind of manager.) The additional data in the executive class will be the size of the employee’s yearly bonus and the
number of shares of company stock held in his or her stock-option plan. Add the appropriate
member functions so these data items can be input and displayed along with the other
manager data.
Create and Implement a C++ program to overload ++ operators for the class Time.
Data members should be hour, minute and seconds.
Set data members as zero in default constructor.
Take one object in main to set 23:24:59 hrs.
Display time in the given format 23:24:59 hrs.
Overload ++ operator to make a stop watch. (i.e. that will increment seconds by 1 each
time its called)
Make a function by name add_time() to increment seconds.
Write a driver program to test your class.
Create and Implement a C++ program to overload >, <, == operators for the class Complex
numbers. Take two objects of class and compare both objects. Write a driver program to test
your class.
Create and Implement a C++ program to make a class box. Set values of its data members i.e.
length, width and breadth using constructor. Make member function to display the volume of
box. Use operator overloading to add, subtract, multiply and divide the data members (using
objects in main) length, breadth and width. Show volume of each overloaded operator’s
object. Write a driver program to test your class.
Write a Java GUI application that will keep track of sport vehicle details. The application must contain the vehicle name, vehicle price, 0 – 100 in seconds and the engine size.
Q.3.1 On the form create three radio buttons and a list box to display the vehicle details. Also create a submit button that when clicked will display the vehicle name, vehicle price, 0 – 100 in seconds and engine size.
Q.3.2 Create a sequential file (cars.txt) that contains data for the following fields: • The vehicle name • The vehicle price • The speed from 0 to 100 in seconds • The engine size
Write a Java application and use a Two dimensional array to store five Dutch, French and Italian translated words. Use a single array to store the English words. Your program must:
Q.2.1 Contain a single array to contain the following five English words and a Two dimensional array to store the following Dutch, French and Italian translated words. ENGLISH WORD sky, run, study, music
DUTCH WORD hemel, rennen, studie, muziek
FRENCH WORD ciel, courir, etude, musique
ITALIAN WORD cielo, correre, studia, musica
Q.2.2 Print out each English word with the translated Dutch, French and Italian word.
Develop a Java GUI application that will display the ink cartridge usage of three different printers with a time span of three years.
Q.1.1 On the form, create two combo boxes, to allow a user to select between three different printers and years. When a user has selected a printer and year and clicked the submit button, display the amount of ink cartridges used for that year. Use the following table for the printers and yearly cartridges used:
2018 HP Deskjesk 650 10 35 20
2019 Canon Z100 30 31 33
Q.1.2 You are also required to create a menu system which will allow the user to exit the application under the file menu. Under the tool’s menu, allow the form submission and an option to display the yearly ink cartridges used for each printer. The layout of the form is left to your discretion. Marks will be allocated to the presentation and effectiveness of the layout, but the following layout is displayed for your convenience
Exceptions:
1. Create a situation where an exception will occur
2. Create a situation where an exception will occur, and catch the exception.
3. Create a situation where an exception will occur, and catch the exception, the display a custom message.
4. Create a situation where an exception will occur, and catch the exception, then display the caught exception’s internal message.
5. Write code utilize the finally block
6. Create a situation where an exception will occur, and pass the exception to be handled up the chain.
7. Create a situation where no exception will occur, but generate an exception anyway.