Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Aims:Create user-defined type andavoid static and dynamicchecking problems. Topic:Dynamic checkingChecklist:1.Make sure Git installation is configured with your name.2.Make sure Git installation is configured with your

Aims:Create user-defined type andavoid static and dynamicchecking problems. Topic:Dynamic checkingChecklist:1.Make sure Git installation is configured with your name.2.Make sure Git installation is configured with your university e-mail address.3.Java compiler and Java Runtime Environment have the same version and their version is 8 or higher.4.Notepad++ is configured such that the Tab length is 3 spaces.Summary: Define an integer type to store and perform basic arithmeticoperations. Questions:Task 4.1: Create a folder on your machine and name it with your IDTask4.11.Initialize this folder as a Git repository. 2.Trach *.java and *.png files only.3.Write and debug your codeincrementally following layout scheme and style presented in the lectures:a.Save the file(s)in Notepad++b.Stage the fileby git addfilec.Store the file in the Git repositoryby git commit -m comment.d.Show the status of your repositoryby git status.4.Integers valuessmaller or greater than minimum or maximum of integer valuesin Java are caught by dynamic checking. To handle integer values less than-263or values greater than263,theListcan be used to represent huge integers. In this task, use information provided in Slide 31in Lecture Static Checkingto define a public class HugeIntegerthat represents a big integer value. The class should provide a method to set a large value as string (e.g.: 862758250540736047343432411236541)and storing itin aList object.There are many ways to read the digits of this number and store each digit as a separate element in in the Listobject, the simplest is to loop throughthe string of digits reading from right one characterat a timeand converting the digit into integer type and storing itin the list objectat index starting from zero.To convert a one-character string to integer type use the static method provided in the Integer class Integer.parseInt(String s). The loop should be part of the constructor of the classHugeInteger.The constructor signature should be as follows:Task 03: Started on Session 9-11-2020 Software construction & documentation labSCDL2publicHugeInteger(String integerAsString)When finish the constructor, write a method toString()to return the number as a string with the following signature:public String toString()5.Write a class TestHugeIntegerto create an instance of HugeIntegertype with a value shown in Step 3 and print it to the standard outputin the following format:Here is a huge integer value: 8627582505407360473434324112365416.Take a snapshot of the final compilation and run steps and save in file result.png7.Compress the repository and upload at IDTask4.1link in the Lab course website

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions