Time Converter 1. Write a program that converts dates from a numerical month-day format to alphabetic month-day format. IE 1/31 or 01/31 would have an output of January 31. 1. User enters the month and day as a single string. It is then converted. (10%) 2. Create 2 exception classes (20%) 1. MonthException thrown for invalid months 2. DayException-thrown for invalid days for the given month 3. You can assume Feb is always 28 days 2. This should run in a for loop and end when a user is done entering dates (70%)
Q: It's crucial to know the software project's goals.
A: Introduction: Project deliverables are any physical or intangible outputs that are submitted as part…
Q: This article will go through the distinctions between assemblers, compilers, and interpreters in…
A: We have to explain the distinctions between assemblers, compilers, and interpreters in detail.
Q: Ten points are evenly spaced around a circle (like a clock face). A particle moves around the circle…
A: Answer the above question are as follows
Q: How can an integrated information system be understood and defined from an organizational and…
A: Let us see the answer:- introduction In order to support organizational functions like…
Q: Discuss the several versions of Microsoft Windows that are available, as well as the major and new…
A: Service Level Agreement: A Service Level Agreement (SLA) is a contract that specifies, typically in…
Q: Please explain why computers and smartphones don't qualify. Determine whether your reaction is based…
A: Students are developing an unhealthy dependence on their mobile devices, resulting in decreased…
Q: Examine how people react when they encounter computer and mobile app difficulties that you have…
A: 1. However, the database was only a small portion of the overall programming. Errors typically occur…
Q: Discover the similarities and distinctions between an assembler, a compiler, and an interpreter.
A: BASIS FOR CONVERSION COMPILER INTERPRETER ASSEMBLER Conversion It converts the…
Q: f('A' == 'a' || 'B' > ' printf("AA"); se printf("aa"); printf("BB");
A: Introduction: Below run the c program with ouput C is a procedural and general-purpose…
Q: A star topology is a computer network design in which each network node is linked to a central hub.
A: Given that, what is the star topology in a computer network, where a user links each network node to…
Q: Obtain the following input integer values from the user: -the date broken down into month, day and…
A: We need to write a C++ code for the given scenario.
Q: Can software quality be evaluated when the customer changes the product's purpose?
A: 1. The process of creating a set of instructions that tells a computer how to perform a task is…
Q: What distinguishes the Oracle database from other kinds of databases, particularly relational…
A: Relational databases: They are built using the set theorem-based relational paradigm. It keeps…
Q: Explain entity-relationship modeling.
A: Real-world entities and their connections serve as the basis for entity relationship models. Second,…
Q: What is the distinction between the two words in the context of computers?
A: The distinction between Computer Organisation and Architecture Computer organization is the study of…
Q: When compared to other data structures, such as a linked list or an array, the benefits of a binary…
A: Given: Take into account the following operations: You may access every component. Assume that the…
Q: The capacity to keep track of both functional and non-functional engineer. requests is a must for a…
A: System requirements which simply refers to the one it is the configuration that a system must have…
Q: Which software development project deliverables exist?
A: Start: Project deliverables are all of the tangible and intangible things that a project makes.…
Q: Provide a brief overview of how device requests may be managed.
A: Explain how you think requests for devices may be controlled. A computer may have several…
Q: Write a program, which creates an array of N elements of type integers. Output and display how many…
A: Answer: Algorithms: Step1: We have declared N i and C where N is the size of array and i for the…
Q: Write a script to sorts file names which start with s and have only 2 letters with extension.txt in…
A: In this question we have to write a bash program where we need to sort file names which starts with…
Q: Is Object Orientation required to be defined? Object-oriented software development
A: 1. The process of creating a set of instructions that tells a computer how to perform a task is…
Q: Give an example of how an engineer in charge of generating a system requirements specification may…
A: Functional needs can be broad or extremely specific, depending on the customers buying criteria.
Q: Differentiate between symmetric and asymmetric multiprocessing techniques. What are the benefits and…
A: The usage of two or more central processing units within a single computer system is known as…
Q: Find error
A: The correct C++ code is shared below:
Q: Discuss the possible threats that insiders pose to a company's security, as well as the incentives…
A: Insiders are the company's employees or managers who work for the company and are responsible for…
Q: What do you imagine an email to be in your mind? Why does sending an email from one place to another…
A: The answer is given below step.
Q: The Harvard and von Neumann computer designs are diametrically opposed.
A: Computer design which refers to the one it is concerned with the hardware design of the computer.…
Q: Using a firewall, your computer is shielded from possible dangers on the internet. It's crucial to…
A: A firewall acts as the gatekeeper of a network, blocking access to and egress from the system for…
Q: How can CPU Scheduling increase OS performance?
A: The central processing unit, or CPU, is the component of a computer that carries out instructions.…
Q: Explain the difference between a firewall and a packetized data stream.
A: Firewall: Network security mechanisms called firewalls stop illegal access to a network. A hardware…
Q: What types of changes may be made to the computer network system to maintain it virus-free?
A: Answer: We need to write the what are the types of changes and steps taken to protect from the…
Q: Many of the disadvantages of cloud computing go unreported or are misunderstood.
A: 1) Cloud computing is a term referred to storing and accessing data over the internet. It doesn’t…
Q: tring.substring: 1 String substring(int beginIndex) // i). 2 String substring(int beginIndex, int…
A: Note:- As per Guidelines, I am only allowed to answer one question until student has asked for a…
Q: Explain why the Internet requires a domain name system (DNS), then identify its basic components and…
A: Introduction IP addresses are utilized for PC correspondence. We should use domain names rather than…
Q: Please introduce the Memory Hierarchy and explain its benefits.
A: We need to discuss Memory Hierarchy and it's benefits. ***As per the guidelines, o ly 1st question…
Q: Explain why the Internet requires a domain name system (DNS), then identify its basic components and…
A: The Domain Name System (DNS) was introduced in the early 1980s. It depicts a network of servers…
Q: What precisely does "user-defined data types" mean?
A: Answer is
Q: The Instruction Set provides a wide range of instructions. Explain the distinctions between the two.…
A: Introduction An instruction set is an assortment of orders written in machine language for a central…
Q: What is the distinction between the two words in the context of computers?
A: Solution: Differences between computer architecture and organisation Computer organisation is the…
Q: Consider a 2D array arr[20][20] having base address 2000 and no. of bytes per element is compute the…
A: Answer: We need to write the find the address of given information in row-major and column major so…
Q: An array is a group of memory locations related by the fact that they all have the same name and but…
A: Correct Answer is " False "
Q: Show a system requirements engineer how to keep track of both functional and non-functional needs.
A: Requirement analysis is a critical process that enables the success of a system or software project…
Q: Why is it that adding a data object to a data model is not recommended?
A: A data model (or datamodel) is an abstract model that organises and standardises the relationships…
Q: Where do analogies exist between computer science and other academic disciplines? How do they…
A: Computer science is the study of computers and algorithmic processes, including their underlying…
Q: The benefits of a binary search tree over other data structures, such as a linked list or an array,…
A: Compilers and interpreters translate high-level programming languages into computer-understandable…
Q: For almost 20 years, Microsoft has pioneered the development of tablet devices (such as the iPad)…
A: Microsoft's inability to match Apple's success for the following reasons: The following list…
Q: Examine the differences and similarities between Binary Search Trees and AVL Trees. Is it feasible…
A: Binary search tree: The middle portion of this Tree changes into the root center, while the right…
Q: What exactly does ORM stand for?
A: Introduction: In most cases, relational databases and object-oriented programming are "bridged"…
Q: Write a C++ program that : Create a stack of integers called age. Fill the elements a 10 elements.…
A: The program is creating stack of 10 integers called age using C++.
Time Converter
1. Write a program that converts dates from a numerical month-day format to alphabetic month-day format. IE 1/31 or 01/31 would have an output of January 31.
1. User enters the month and day as a single string. It is then converted. (10%)
2. Create 2 exception classes (20%)
1. MonthException thrown for invalid months
2. DayException-thrown for invalid days for the given month
3. You can assume Feb is always 28 days
2. This should run in a for loop and end when a user is done entering dates (70%)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
- JAVA EXCEPTION HANDLING:Define a new exception, called ExceptionLineTooLong, that prints out the error message "The strings is too long". Write a program that reads phrase and throws an exception of type ExceptionLineTooLong in the case where a string is longer than 80 characters. For example: Input Result The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped…Java Foundations: Please provide a basic exception program. Do not use input, output. Write the Java code for the following: Write the InvalidGradeException class that will be used below Write the Java program that reads an integer grade from a user and checks that it is valid (between 0 and 100). If it is invalid an InvalidGradeException will be thrown, stating what the invalid grade is. This will be caught in the main( ) method which will write a message about the invalid grade. If the grade is valid, it is written to the monitor.python Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burning_heart_rate() to calculate the fat burning heart rate. The adult's age must be between the ages of 18 and 75 inclusive. If the age entered is not in this range, raise a ValueError exception in get_age() with the message "Invalid age." Handle the exception in __main__ and print the ValueError message along with "Could not calculate heart rate info." Ex: If the input is: 35 the output is: Fat burning heart rate for a 35 year-old: 129.5 bpm If the input is: 17 the output is: Invalid age. Could not calculate heart rate info. # here is the script I have but its not working def get_age():age = int(input())age=int(input("Enter the age:"))if age<18 or age>75:raise ValueError('Invalid age.')return age # TODO: Complete fat_burning_heart_rate() functiondef fat_burning_heart_rate(age):heart_rate=(220-age)*.70return heart_rate if __name__ == "__main__":#…
- JAVA PROGRAM Probloem: Define a new exception, called ExceptionLineTooLong, that prints out the error message "The strings is too long". Write a program that reads phrase and throws an exception of type ExceptionLineTooLong in the case where a string is longer than 80 characters. First Example:Input:The quick brown fox jumped over the lazy dogs.Output:The quick brown fox jumped over the lazy dogs. Second Example:Input: The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown fox jumped over the lazy dogs. The quick brown fox jumped over the lazy dogs.The quick brown…Please do this in Java! 3. RetailItem Exceptions Programming Challenge 4 of Chapter 6 required you to write a RetailItem class that holds data pertaining to a retail item. Write an exception class that can be instantiated and thrown when a negative number is given for the price. Write another exception class that can be instantiated and thrown when a negative number is given for the units on hand. Demonstrate the exception classes in a program. /** *Description: This program will displays a string without any user interaction *Class: Fall - COSC 1437.81002 *Assignment1: Hello World *Date: 08/15/2011 *@author Zoltan Szabo *@version 0.0.0 */ For each method, you will also be required to create docstring as follows: /** * @param String as args * @return Termination code as int, 0 for normal, anything else is error condition * @throws Nothing is implemented */ Flowcharts/UML and Pseudo code All assignment questions must show design flowchart/UML and/or pseudo code unless otherwise…Java Foundations: Please provide a basic exception code. Do not use input, output. Please provide code and explain. Thank you. Write the Java code for the following: Write the InvalidGradeException class that will be used below. Write the Java program that reads an integer grade from a user and checks that it is valid (between 0 and 100). If it is invalid an InvalidGradeException will be thrown, stating what the invalid grade is. This will be caught in the main( ) method which will write a message about the invalid grade. If the grade is valid, it is written to the monitor.
- Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A, B, C, D, E" is correct. Each question has one correct answer. Thank you. Part 1 - Which pair of keywords can you use to handle an exception in Java? A. throw, catchB. try, catchC. throw, throwsD. try, finallyE. catch, finally Part 2 - Which method of the "Exception" class returns a message string? A. getError()B. getMessage()C. printMessage()D. traceMessage()E. toString()Exception handling The reciprocal of a number is 1 divided by that number. The starter program below is expected to compute the reciprocal of all the numbers in a list. Fix the starter program to safely catch and handle incorrect divisions accordingly. If an exception occurs, catch the exception and print the exception. Your output should match the expected output below. Expected output The reciprocal of 1 is 1.0 The reciprocal of 2.5 is 0.4 The reciprocal of -6 is -0.17 division by zero The reciprocal of 0.4 is 2.5 The reciprocal of -0.17 is -5.88 unsupported operand type(s) for /: 'int' and 'str' The reciprocal of 3.14 is 0.32 type complex doesn't define __round__ method The reciprocal of 3.141592653589793 is 0.32 Here is the code from the starter file we are required to use: import math numbers = [1, 5 / 2, -6, 0, 0.4, -0.17, 'pi', 3.14, 2-6j, math.pi] for n in numbers: reciprocal = 1 / n print(f"The reciprocal of {n} is {round(reciprocal, 2)}")السؤال 1 .Write a program in java to enter length and width to find the area of a rectangle Use exception handling, if a user enters some wrong input, then program should throw an exception and this program should catch the exception example if in place of length or width a user enters some string value .then the program should throw an exception .Use finally keyword to print the statement استعراض الملفات المحلية إرفاق ملف
- Define an exception class called CoreBreachException. The class should have a default constructor. If an exception is thrown using zero-argument constructor, getMessage should return "Cor Breach Evacuation Ship!" The class should also define a constructor having a single parameter of type String. If an exception is thrown using constructor, getMessage should return the value that was used as an argument to constructor.use C++ programing language Write a program that prompts the user to enter a person's date of birth in numeric form such as 8-27-1980. The program then outputs the date of birth in the form: August 27, 1980. Your program must contain at least two exception classes: invalidDay and invalidMonth. If the user enters an invalid value for day, then the program should throw and catch an invalidDay object. Similar conventions for the invalid values of month and year. (Note that your program must handle a leap year.)Develop an exception class named InvalidMonthException that extends the Exception class. Instances of the class will be thrown based on the following conditions: The value for a month number is not between 1 and 12 The value for a month name is not January, February, March, … December Develop a class named Month. The class should define an integer field named monthNumber that holds the number of a month. For example, January would be 1, February would be 2, and so forth. In addition, provide the following methods: A no-argument constructor that sets the monthNumberto 1. An overloaded constructor that accepts the number of the month as an argument. The constructor should set the monthNumberfield to the parameter value if the parameter contains the value 1 – 12. Otherwise, throw an InvalidMonthException exception back to the caller. The exception should note that the month number was incorrect. An overloaded constructor that accepts a string containing the name of the month,…