In this assignment, you will build a program using techniques from previous CSS courses that counts unique fractions. No new constructs from our readings are expected, and as such, you can complete this program with just a handful of lines (12-25) of code in just one main function. (But do NOT feel that your code needs to be that short!) Note that the use of methods will improve your design and improve your grade. You will need to use loops, ifs, comments, etc., (in other words, structured programming) to complete this assignment and achieve the outcomes listed below. Included below is a sample execution of your program as well as a list of outcomes your program is to implement; notice reduction of fractions is optional in this version of the assignment. Do NOT build any classes (other than your driver, obviously). You are NOT allowed to use any of Java's built-in abstract data types like ArrayList or HashMap or any of that stuff.
Introduction
Your project is to read in a series of fractions from a text file, which will have each line formatted as follows: "A/B". A sample text file is listed below, and the purpose of your program is to read in each fraction and count the number of occurrences for the current fraction. When all the input is consumed (or as the input is consumed), your program will print out its list of unique fraction and their corresponding count – see the output below (and you may assume no blank lines or misleading characters; see the text file link on the website for one of the actual inputs I’ll use when testing your submission).
Sample Text Input
6/3
7/3
6/3
12/6
Sample Console Output
6/3 has a count of 3
7/3 has a count of 1
NOTE: it is also fine (though not required) if your program simplifies the fractions so that the output is:
2/1 has a count of 3
7/3 has a count of 1
---But either way, 6/3 and 12/6 count as the same fraction, so you do need some mechanism for determining if two fractions that look different are actually the same. The only optional part of the assignment is how you display them in the end.
text file:
6/3
4/2
5/9
80/90
800/900
15/25
5/5
1/1
1/10
1/100
1/1000
1/3
2/6
1/2
1/3
1/1
1/4
1/5
1/6
1/7
1/8
1/9
2/1
2/2
2/3
2/4
2/5
2/6
2/7
2/8
2/9

Answers

Answer 1

A style sheet language called Cascading Style Sheets is used to describe how a document published in a markup language like HTML or XML is presented.

What CSS means?

Web pages are styled and laid up using CSS (Cascading Style Sheets), which may be used to change the font, color, size, and spacing of your text, divide it into numerous columns or add animations and other ornamental elements.

CSS, which stands for Cascading Style Sheets, is a stylesheet language that tells the browser how to display our HTML; it is not a programming language. Today, CSS is used to determine the design of more than 95% of all websites on the internet, making it incredibly important.

Static web pages and web apps are made using the markup language known as HTML. The display of markup-language-written texts is controlled by CSS, a style sheet language. Green background color; HTML not allowed in CSS files.

Anonymous answered this import java. util.*; import java.io.File; public class FractionCounter { public static int gcm(int a, int b) { return b == 0 ? a : gcm(b, a % b); } public static void main(String [] args) { HashMap<String, Integer> fractionCou

To learn more about CSS refer to :

brainly.com/question/28721884

#SPJ4


Related Questions

n his e-mail to select bank customers, Patrick was careful to use an informative subject line and to use a font size and style that is easy to read. These preparations serve what function in this communication scenario?netiquetteaudiencepurposeworkplace c

Answers

Answer:

These preparations serve the purpose of making the e-mail more effective in communicating the message to the audience.

Explanation:

You assign each anchor its own anchor name, using the ____attribute.
a. Name
b. anchor
c. link
d. identify

Answers

Answer: The correct answer is "a. Name". In HTML, you can use the "name" attribute to assign a unique name to an anchor element, which can then be used to create a hyperlink to that specific location on the page.

Explanation: For example:

<a name="top">Top of the Page</a>

This anchor element can then be linked to using the following syntax:

<a href="#top">Go to the top of the page</a>

The "name" attribute is used in combination with the "href" attribute to create a hyperlink. The "href" attribute specifies the target of the link, and the "name" attribute specifies the name of the anchor to which the link should point.

A syntax error occurs when a programming language rule is broken.
O True
O False

Answers

Trueeeeeeeeeeeeeeeeeeeeeee

Answer:

true

Explanation:

Remove the smallest element from the set, s. Assume the set is not empty.

Answers

The answer of this question is min = None for e in s : [Tab Key] if min == None or e < min : [Tab Key] The tab key min = e s.remove(min)

What is an element in an HTML?

The root element of an HTML document is the html> tag, which defines the entire HTML document. It has two tags: start (html) and end (/html). The body> element is then contained within the html> element: My Initial Heading My first paragraph. , whereas the opening tag is p>. This paragraph is an element of a paragraph.

What does a CSS element mean?

The element() CSS function defines a <image> value created from such an arbitrary HTML element. If the HTML element containing this picture is modified, the CSS properties that use the new value will also be immediately updated.

To know more about element visit :

https://brainly.com/question/15093505

#SPJ4

What variables may be used to track each loop in the program?

Answers

There are several variables that can be used to track each loop in a program, depending on the specific use case and the programming language being used. Here are a few examples:

Iteration counter: This is a variable that is incremented each time the loop runs, and is often used to track the number of iterations the loop has completed. This variable can be used to terminate the loop after a certain number of iterations.

Loop variable: This is a variable that is used to iterate through a collection of items, such as an array or a list. The loop variable is typically assigned the next item in the collection each time the loop runs.

Boolean flag: This is a variable that is used to keep track of whether the loop should continue running or not. The flag is set to false when the loop should terminate, and is checked at the beginning of each iteration.

Indicator variable: This is a variable that's used to identify the current state of the loop. This could be a flag that's used to control the loop or could be an index of an array.

Sentinels: This is a special value that when found will cause the loop to terminate.

The specific variables you use to track a loop will depend on the requirements of your program and the logic of the loop.

For example, if you're iterating through an array and need to keep track of the current position in the array, you might use an index variable.

On the other hand, if you're running a loop that continues until a certain condition is met, you might use a Boolean flag or a sentinel value to control the loop.

Learn more about variables:
https://brainly.com/question/12475735

A PC that you are investigating has an IP address of 10.1.1.23. Without any further information, which of the following can you conclude from this IP address assignment?
A. This is a LINKLOCAL network address assigned by Automatic Private IP Addressing.
B. The PC must be part of an enterprise level network.
C. The IP address was statically assigned
D. The PC is a LAN client not connected directly to the Internet.

Answers

This IP address assignment leads to the conclusion that the PC is a LAN client and not directly linked to the Internet.

Among the following, which one can be an IP address?

An IP address is written as four digits separated by periods, using a 32-bit format. Every number is between 0 and 255. An IP address might be 1.160. 10.240, for instance.

Which of the following methods is used to give a device an IP address?

Dynamically allocating an Internet Protocol (IP) address to any device or node on a network so they can connect using IP is done using the network management protocol known as DHCP (Dynamic Host Configuration Protocol).

To know more about IP address visit:-

https://brainly.com/question/16011753

#SPJ4

Consider the following procedure. PROCEDURE doSomething(numi, num2) { DISPLAY(num1) RETURN(num1) DISPLAY(num2) } Consider the following statement. DISPLAY(doSomething(10, 20)) What is displayed as a result of executing the statement above? a. 10 10 b. 10 20 C. 10 10 20 d. 10 20 10

Answers

(b) 10 20

10 20 is displayed as a result of executing the statement above.

Procedural abstraction: What is it?

When we build code parts (known as "procedures" or, in Java, "static methods") that are generalized by having variable parameters, we use procedural abstraction. Depending on how its parameters are set when it is called, our code is designed to be able to handle a wide range of various situations.

Improves speed procedural abstraction?

Program execution performance is increased through procedural abstraction. This method determines whether a character is a vowel.

Reduces duplicate code procedural abstraction?

Eliminating redundant code is an excellent usage of the technique. Using a procedure will make that section of code easier to edit because it only appears once in the application, in addition to making the app easier to read.

To know more about programming visit:

https://brainly.com/question/22654163

#SPJ4

disadvantages of network

Answers

wifi works with all of the apps and does online classes

to remove spyware, users need to obtain a special program that can detect and delete it. true or false

Answers

It is true that consumers must get a specialized program in order to identify and remove spyware.

Spyware: What is it?

Spyware. an instance of malware that tracks down and records user data covertly. Virus. a piece of code with the ability to duplicate itself that generally has negative effects, including damaging the system or erasing data

What technique is employed to confirm the identification of computer users?

Biometric verification Users are increasingly choosing to have their biometrics verified. Today, two common techniques are fingerprinting and facial recognition. Other approaches consist of hand geometry, retinal and iris scans, voice recognition, and analysis based on signatures.

To know more about spyware visit :-

https://brainly.com/question/29786858

#SPJ4

Which of the following objects is installed between the back side of the system case and the motherboard's ports?
I/O shield
Heat spreader
Fan
Standoffs

Answers

Between the ports on the motherboard and the rear of the system casing are installed I/O shield objects.

What tasks are carried out by a motherboard's chipset?

The movement of data between components on a motherboard is controlled by an electronic chipset. Between the CPU, GPU, RAM, storage, and peripherals, it serves as the traffic controller. It has been referred to as the motherboard's "glue" by experts.

What benefit does buying a motherboard with integrated graphics and audio provide?

The term "integrated" denotes that all of the parts, including connectors, slots for peripheral devices, serial ports, and I/O ports, have been incorporated by the manufacturer into the circuit board. The fact that this kind of board is the less expensive choice is its greatest advantage.

To know more about motherboard visit :-

https://brainly.com/question/29834097

#SPJ4

Which of the following penetration tests provides complete knowledge and information, such as network diagrams, about the environment to be tested

Answers

White-box penetration tests provides complete knowledge and information, such as network diagrams, about the environment to be tested.

About Penetration test

According to experts in this field, information system security is basically handled in the following ways:

The first is for defense purposes and the other is proactive security. Penetration tests are carried out in the form of trying to infiltrate company information systems by trying every possible cam. The purpose of this test is not only to identify vulnerabilities, but also to detect these vulnerabilities and to ensure that only authorized persons have access to the system to detect possible infiltration.

Penetration tests are generally carried out using certain pre-designed methodologies. These test methods are used to ensure that the study can be verified, interpreted, and reproducible when the tried and standard set is applied, the more precise the obtained In general, weakness screening and infiltration tests are similar For weakness screening, a number of software tools are used and security holes in the system identified In this penetration test aims not only to determine security vulnerabilities, but also to detect access to Data bases information in the system by using comments in.

As a result, the problem of how secure the applications and data in the system is is a common problem of all companies.

Penetration tests provide answers to problem in Various infiltration tests are available, these vary depending on the target, the attack to be simulated and the system, Therefore, the penetration test to be applied to an enterprise depends on the characteristics and needs of the enterprise.

Typically, a penetration test includes network penetration , applicant penetration, database penetration, and wireless cable penetration

Your question is incomplete but most probably your full question was:

Which of the following penetration tests provides complete knowledge and information, such as network diagrams, about the environment to be tested?

a. White-box penetration

b. Grey-box penetration

c. Black-box penetration

Learn more about penetration test at https://brainly.com/question/29560410.

#SPJ4

What are two valid steps in the six step troubleshooting method discussed in this chapter?
1. compliment the user's knowledge, insight, and experience
2. Boot from the Windows setup DVD
3. msconfig.exe
taskmgr.exe
4. Document outcomes
Establish a Theory

Answers

4. Document outcomes Establish a Theory .

After one problem has been fixed during an on-site service call, what should you do?

When you believe a problem has been fixed, gently inform the client that the work is complete and leave.

What phase of system troubleshooting is the most crucial and initial?

Finding the issue is the first step inside the troubleshooting procedure. Gather as much data as you can from the computer and the customer during this step.

To know more about Establish a Theory visit:

https://brainly.com/question/818392

#SPJ4

NEC 422.16(B)(4) permits a range hood to be cord-and-plug connected. The receptacle would be installed ____ the range.

Answers

Receptacles A contact device fitted at an outlet for the connecting of an attachment plug is referred to as a "Receptacle" according to Article 100. The National Electrical Code frequently uses the words "receptacle" and "receptacles" (NEC).

What is the NEC code for outlets in the kitchen?

Every counter that is 12 inches broad or wider is required by the NEC to have an outlet above it. Additionally, there must be a plug every 4 feet or more.

The number of outlets in a kitchen

We advise having at least eight twin sockets in kitchens between 12 and 25 square metres, and at least ten in rooms bigger than 25 square metres.

To know more about Receptacles visit:-

https://brainly.com/question/938543

#SPJ4

Let AequalsPDP Superscript negative 1 and P and D as shown below. Compute Upper A Superscript 4. Pequalsleft bracket Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 3 2nd Row 1st Column 2 2nd Column 5 EndMatrix right bracket ?, Dequalsleft bracket Start 2 By 2 Matrix 1st Row 1st Column 1 2nd Column 0 2nd Row 1st Column 0 2nd Column 2 EndMatrix right bracket

Answers

SOLUTION BELOW THE PICTURE.

To know more about AequalsPDP visit:

https://brainly.com/question/15656045

#SPJ4

What do “phone-copying” systems allow investigators to do?
(Forensic Science class, digital forensic science)

20 points will give brainliest

Answers

Answer:

it allows them to be able to look at the recent things people done on it . i believe

It allows them to be able to look at the recent things people done on it . i believe.

What is Phone copying?

You can backup your iOS device using iCloud, or you may backup your Android device using system backup or Android backup tools.

In order to make sure nothing important is lost, you should additionally back up any particular data you're worried about losing, like family photos, on a different server.

You can use them to transfer your data to a new device if all you want to do is keep a complete copy of the info on your phone. You might need to request a new SIM card from your provider, though. To learn more about their policy, get in touch with their customer support team.

Therefore, It allows them to be able to look at the recent things people done on it . i believe.

To learn more about phone copying, refer to the link:

https://brainly.com/question/30284610

#SPJ3

Software designed specifically for a highly specialized industry is called ____.
O Horizontal market software
O Mass-market software
O Vertical market software
O Industry standard software

Answers

Vertical market software is specifically created for a highly specialized industry.

Software for vertical markets: What is it?

Software designed for a particular industry, set of applications, or customer is known as vertical market software. This is distinct from software for the horizontal market, which can be used across numerous industries.

Who employs software for vertical markets?

Software created for specialized applications or for a particular clientele is therefore referred to as vertical market software. Because they are only used by a particular set of people, banking, investment, and real estate software packages are all examples of vertical market software applications.

To know more about Vertical market software visit :-

https://brainly.com/question/29992362

#SPJ4

The data type string has a named constant, ____, associated with it.
a. string::size b. string::pos c. string::size_type d. string::npos

Answers

String::npos

What exactly does string:: NPOS means?

Npos: It is a constant static member value with the maximum allowable value for a size t element. It literally means till the string is finished. It is utilized in the string’s member functions as the value for a length parameter. It is typically used as a return value to indicate that there are no matches.

A nonprofit organization (NPO) is one that is not motivated by profit but by a commitment to a certain cause that receives all money over and beyond what is required to run the organization. As a result, NPOs are granted tax-exempt status by the federal government, which means they do not have to pay income tax.

To learn more about string:: NPOS to refer:

https://brainly.com/question/23111640

#SPJ4

What model involves the creation of data and process models during the development of an application

Answers

Answer:

Data modeling

Explanation:

Data modeling is a term used in computer or software engineering. It is a technique of creating a data model for an information system through unusual formal methods. It also involves the analysis of models during the development of an application. It is further divided into three places including:

1. Conceptual data

2. Logical data model

3. Physics data model

Hence, Data modeling is a model that involves the creation of data and process models during the development of an application

In Hyper-V, an _____ virtual switch, allows the host to communicate with the virtual machines connected to the switch.

Answers

Virtual machines (VMs) may connect online with one another, the host operating system, and external networks thanks to Hyper-V virtual switches.

What does Hyper-virtual V's switch mean?

When you install the Hyper-V server role, Hyper-V Manager makes the software-based layer-2 Ethernet network switch known as Hyper-V Virtual Switch available.

How can virtual COM ports on a Hyper-V host computer connect with one another?

Using the Serial over Ethernet Connector method (in Windows or Linux) is one of the simplest ways to connect a COM port in a virtual machine. With the help of the program Serial to Ethernet Connector, you can access COM in VirtualBox, Hyper-V, and VMware environments.

To know more about Virtual machines visit:-

https://brainly.com/question/29535108

#SPJ4

As you are analyzing a website, what is one indicator of relevance?


how often individuals promote a site

how often women select a site

how often men select a site

how often individuals select a site

Answers

How often individuals promote a site, not sure about this one. It’s either that one or how often individuals select a site

for group calculations, microsoft access supports ____ built-in statistics.

Answers

Microsoft Access supports STDEV, MAX, and VAR built-in statistics for group calculations.

How is math done in Access?

Pick a table. Choose a data type after clicking on Click to Add > Calculated Field. Click OK after entering a calculation in the field. You can manually type the expression in the expression edit field or you can choose expression fields, elements, and values to enter them there.

What in Access is a calculated field?

Any field that derives its value from a function applied to values from other table fields is said to be calculated. Inputted values made by hand can also be calculated. The data in the field only appears during the query. The database tables do not actually contain it.

To know more about Microsoft  visit :-

https://brainly.com/question/2704239

#SPJ4

Which is an advantage of application service providers (ASPs)? a. They offer software customized to users' needs. b. They integrate a customer's other applications and systems easily c. They ensure that software is kept up to date, based on users requests. d. They ensure that applications fully meet an organization's needs

Answers

Simply put, an application service providers ASP gives managers the chance to do what they do best: manage the business, even though cost is typically the key motivator for a company to seek out their assistance.

is a business model in which application service providers (ASPs) charge customers for the software they receive?

What is SaaS (software as a service)? The term "on-demand software" refers to ASP's business strategy for selling users software that can be used either permanently or only sometimes.

Of the following is sometimes referred to as on-demand software?

SaaS programs are also known as hosted software, on-demand software, and web-based software. Regardless of the nomenclature, SaaS apps are hosted on the servers of a SaaS provider. Security, availability, and performance of the application are all managed by the provider.

To know more about application service providers visit :-

https://brainly.com/question/14973003

#SPJ4

"Based upon the contents of the PUBLISHER table, which of the following is a valid SQL statement?" a. SELECT contact Contact's Name FROM publisher; b. SELECT publisherID FROM publisher; c. "SELECT contact, name FROM publisher;" d. SELECT name FROM publishers;

Answers

Based upon the contents of the PUBLISHER table, SELECT contact, name\sFROM publisher is a valid SQL statement.

Describe SQL.

The domain-specific programming language known as SQL is used for managing data stored in relational database management systems or for stream processing in related data stream management systems.

Is SQL easy or Python?

Python is more difficult to learn than SQL, for sure. Its very simple syntax serves only to facilitate communication with relational databases. Since relational databases contain a substantial amount of data, the initial stage in each data analysis project is frequently retrieving data via SQL queries.

To know more about SQL visit :

https://brainly.com/question/13068613

#SPJ4

Choose the correct option. i) An object thrown from a moving bus is on example of
(A) Uniform circular motion
(B) Rectilinear motion
(C) Projectile motion
(D) Motion in one dimension​
age

Answers

PROJECTILE MOTION

The answer is option C: "Projectile motion."

Projectile motion refers to the motion of an object that is thrown or launched into the air and follows a parabolic path under the influence of gravity. An object thrown from a moving bus is an example of projectile motion because it is launched into the air and follows a curved path due to the force of gravity.

Option A: "Uniform circular motion" refers to the motion of an object moving in a circular path at a constant speed.

Option B: "Rectilinear motion" refers to the motion of an object moving in a straight line.

Option D: "Motion in one dimension" refers to motion that occurs along a single straight line, rather than in two or three dimensions.

Hope This Helps You!

if your license is suspended it means that

Answers

Answer:

A license suspension means driving privileges are temporarily unavailable to you for a defined period of time. Typically, to end a suspension period, you must participate in specific actions to have your license reinstated.

Define the term Project brief? why is it important to do planning?

Answers

Answer: the project brief is a document that provides an overview of the project.

Explanation: It says exactly what the designer, architect, and contractor needs to do to exceed your expectations and to keep the project on track with your goals and your budget.

dbmss available for use on personal computers include ____ and corel paradox.

Answers

Microsoft Access and Corel Paradox are two DBMSs that can be used with personal PCs.

Which database type is the most widely used?

Today's most popular database type is the relational database. Data is arranged in relational databases into two-dimensional tables (referred to as relations) with columns and rows. Data about an entity and its characteristics are contained in each table.

What does DBMS's database mean?

Explanation: The DBMS (or Database Management System) is a category of system software used for a number of tasks, including building databases and tables and storing data. It also enables changing the information kept in the database.

To know more about DBMSs visit :-

https://brainly.com/question/28342112

#SPJ4

what is represented by the base roof of a phlogentic tree

Answers

Answer:

Ancestral linkage

Explanation:

A phylogenetic tree or a phylogeny, in other words, is a diagram that outlines the history of evolutionary descent of different species, organisms, or genes from a single lineage or shared ancestor.

A phylogenetic tree is typically drawn from the bottom upwards or from the left to the right.

Phylogenetic trees can either be rooted or unrooted. To be rooted means that there is a single ancestral linkage or lineage. Unrooted phylogenetic refers to multiple ancestral linkages.

Cheers

TRUE OR FALSE although a database can consist of only a single file, it is usually a group of files.

Answers

Although a database can consist of only a single file, it is usually a group of files. A database is a critical component of information systems because any type of analysis that is done is based on data available in the database. Data redundancy is eliminated or minimized in a flat file system.

list 5 object which are considered part of ICT. explain its function.




think of three object that you think are not considered part of ICT. explain your answer. ​

Answers

Answer:

Here it is

Explanation:

Processing is not considered as the tool of ICT. Explanation: ICT is Information and Communication Technology. This is one of the trending technologies with new concepts.

Other Questions
An instructor gives four -hour exams and one final exam, which counts as three -hour exams. Find a student's grade if she received , , , and on the -hour exams and on the final exam. Round your answer to one decimal place if necessary. P4(s) + Cl(g) PCI3(l) + energy 4. Calculate the gram-formula mass of the product. Show all work. g/mol How fast does evolution occur?Question 1 options:From one generation to the nextAfter multiple generationsImmediately Is 0 Infinity closed interval? find the values of x and y What features of the internet make it such a use fool tool for politics and government When a motor vehicle strikes a tree while traveling at 40 mph, the unrestrained occupant:A. is thrust under the steering column onto the floorboard.B. remains in motion until acted upon by an external force.C. will decelerate at the same rate as the motor vehicle.D. will most likely be thrown over the steering column. From West Side Story. Which of the lines best shows Tony and Maria's affection for each other? a) "TONY: Maria, Maria. " "MARIA: Ssh!" b) "MARIA: Quiet!" "TONY: Come down!" c) "TONY: He's at the dance. Come down!" "MARIA: He will soon bring Anita home!" "MARIA (smiles): A minute is not enough" "TONY (smiles): For an hour then. " Luke just accepted a job at a new company where he will make an annual salary of $58000. Luke was told that for each year he stays with the company, he will be given a salary raise of $2000. How much would Luke make as a salary after 9 years working for the company? What would be his salary after tt years? Find the range of the relation. x y 3 4 2 2 1 0 0 2 1 4 Responses {4, 4} {4, 4} {3, 2, 1, 0, 1} {3, 2, 1, 0, 1} {4, 3, 2, 1, 0, 1, 2, 4} {4, 3, 2, 1, 0, 1, 2, 4} {4, 2, 0, 2, 4} How did credit cards impact the economy? What was the Three-Fifths Compromise and why was this included in the Constitution? A toy elevator is raised from the ground floor to the second floor in 20 seconds. The power needed using 1000 J of work, is 4. Carla placed three identical plants on asunny windowsill. Using the same amountof water each time, she watered one planttwice a day. She watered the second plantonce a week. She did not water the thirdplant. After three weeks, she found that theplant watered once a week was thriving.The plant that was watered twice a daywas dying. The plant that was not wateredwas brown and dead. What conclusion canCarla draw?A. Water causes plants to die B. Plants need a certain amount of water to live C. Plants should not be placed on sunny windowsillsD. Plants do not live very long What is the military branch Navy? Question 9 of 10Which is the largest number?OA. 5.8 x 10-3B. 2.5 x 105 C. 1.9 106OD. 8.7 x 10 Do landlords look at credit score? How the respiratory system and circulatory system work together to supply oxygen and remove carbon dioxide from the cells? 30 students went on a field trip to the science museum. 60% of the students tried the new Gravity Buster ride at the museum. Write an essay of no less than 200 words on health behaviors, risk factors, and prevention of coronary artery disease (CAD) through exercise